Merge pull request #10709 from LDong-Arm/nrf52_cordio

Default to Cordio BLE stack for NRF52* targets
pull/10776/head
Martin Kojtal 2019-06-09 18:03:34 +01:00 committed by GitHub
commit dc77c40fe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 16 deletions

View File

@ -28,12 +28,9 @@ using utest::v1::Case;
bool test_are_interrupts_enabled(void)
{
// NRF5x targets don't disable interrupts when in critical section, instead they mask application interrupts this is due to BLE stack
// (BLE to be operational requires some interrupts to be always enabled)
#if defined(TARGET_NRF52)
// check if APP interrupts are masked for NRF52 boards
return (((NVIC->ISER[0] & __NRF_NVIC_APP_IRQS_0) != 0) || ((NVIC->ISER[1] & __NRF_NVIC_APP_IRQS_1) != 0));
#elif defined(TARGET_NRF51)
// NRF51 targets don't disable interrupts when in critical section, instead they mask application interrupts.
// This is due to SoftDevice BLE stack (BLE to be operational requires some interrupts to be always enabled)
#if defined(TARGET_NRF51)
// check if APP interrupts are masked for other NRF51 boards
return ((NVIC->ISER[0] & __NRF_NVIC_APP_IRQS_0) != 0);
#else

View File

@ -33,6 +33,10 @@ using ble::vendor::cordio::CordioHCITransportDriver;
extern ble::vendor::cordio::CordioHCIDriver& ble_cordio_get_hci_driver();
#if CORDIO_ZERO_COPY_HCI
#error [NOT_SUPPORTED] Test not relevant for zero copy hci.
#endif
namespace ble {
namespace vendor {
namespace cordio {

View File

@ -23,7 +23,7 @@
#include "pal_types.h"
#include "pal_bb_ble.h"
#if defined(NRF52840_XXAA) && MBED_CONF_CORDIO_LL_NRF52840_CRYPTOCELL310_ACCELERATION
#if defined(NRF52840_XXAA) && defined(FEATURE_CRYPTOCELL310) && MBED_CONF_CORDIO_LL_NRF52840_CRYPTOCELL310_ACCELERATION
#include "crys_rsa_kg.h"
#include "crys_dh.h"
#include "ssi_pal_types.h"
@ -34,7 +34,7 @@
/* Nordic specific definitions. */
#include "nrf_ecb.h"
#include "nrf.h"
#if defined(NRF52840_XXAA) && MBED_CONF_CORDIO_LL_NRF52840_CRYPTOCELL310_ACCELERATION
#if defined(NRF52840_XXAA) && defined(FEATURE_CRYPTOCELL310) && MBED_CONF_CORDIO_LL_NRF52840_CRYPTOCELL310_ACCELERATION
#include "nrf52840.h"
#endif
#include <string.h>
@ -690,7 +690,7 @@ bool_t PalCryptoAesCcmDecrypt(PalCryptoEnc_t *pEnc, uint8_t *pBuf)
return TRUE;
}
#if defined(NRF52840_XXAA) && MBED_CONF_CORDIO_LL_NRF52840_CRYPTOCELL310_ACCELERATION
#if defined(NRF52840_XXAA) && defined(FEATURE_CRYPTOCELL310) && MBED_CONF_CORDIO_LL_NRF52840_CRYPTOCELL310_ACCELERATION
/*************************************************************************************************/
/*!
* \brief Execute the CCM-Mode encryption algorithm.

View File

@ -7088,6 +7088,7 @@
"MBED_TICKLESS",
"MBED_MPU_CUSTOM"
],
"features": ["BLE"],
"device_has": [
"ANALOGIN",
"FLASH",
@ -7115,9 +7116,10 @@
"NRF5x",
"NRF52",
"SDK_15_0",
"NORDIC_SOFTDEVICE",
"SOFTDEVICE_COMMON",
"SOFTDEVICE_S132_FULL"
"CORDIO",
"CORDIO_LL",
"SOFTDEVICE_NONE",
"NORDIC_CORDIO"
],
"config": {
"lf_clock_src": {
@ -7213,7 +7215,7 @@
"WSF_MAX_HANDLERS=10",
"MBED_MPU_CUSTOM"
],
"features": ["CRYPTOCELL310"],
"features": ["CRYPTOCELL310", "BLE"],
"device_has": [
"ANALOGIN",
"FLASH",
@ -7242,9 +7244,10 @@
"NRF5x",
"NRF52",
"SDK_15_0",
"NORDIC_SOFTDEVICE",
"SOFTDEVICE_COMMON",
"SOFTDEVICE_S140_FULL"
"CORDIO",
"CORDIO_LL",
"SOFTDEVICE_NONE",
"NORDIC_CORDIO"
],
"config": {
"lf_clock_src": {