Skip to content

Commit 9bf2d0a

Browse files
paul-szczepanek-arm0xc0170
authored andcommitted
cryptocell acceleration as an option
1 parent 4d23666 commit 9bf2d0a

File tree

2 files changed

+7
-3
lines changed
  • features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_CORDIO

2 files changed

+7
-3
lines changed

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_CORDIO/TARGET_MCU_NRF52840/mbed_lib.json

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
"tx-buffers": {
1717
"help": "Default number of send buffers",
1818
"value": 16
19+
},
20+
"cryptocell310-acceleration": {
21+
"help": "Should the link layer use the Crypto Cell 310 to offload encryption.",
22+
"value": 1
1923
}
2024
}
2125
}

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_CORDIO/TARGET_NRF5x/stack/sources/pal_crypto.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#include "pal_types.h"
2525
#include "pal_bb_ble.h"
26-
#if defined(NRF52840_XXAA)
26+
#if defined(NRF52840_XXAA) && MBED_CONF_CORDIO_LL_NRF52840_CRYPTOCELL310_ACCELERATION
2727
#include "crys_rsa_kg.h"
2828
#include "crys_dh.h"
2929
#include "ssi_pal_types.h"
@@ -34,7 +34,7 @@
3434
/* Nordic specific definitions. */
3535
#include "nrf_ecb.h"
3636
#include "nrf.h"
37-
#if defined(NRF52840_XXAA)
37+
#if defined(NRF52840_XXAA) && MBED_CONF_CORDIO_LL_NRF52840_CRYPTOCELL310_ACCELERATION
3838
#include "nrf52840.h"
3939
#endif
4040
#include <string.h>
@@ -690,7 +690,7 @@ bool_t PalCryptoAesCcmDecrypt(PalCryptoEnc_t *pEnc, uint8_t *pBuf)
690690
return TRUE;
691691
}
692692

693-
#if defined(NRF52840_XXAA)
693+
#if defined(NRF52840_XXAA) && MBED_CONF_CORDIO_LL_NRF52840_CRYPTOCELL310_ACCELERATION
694694
/*************************************************************************************************/
695695
/*!
696696
* \brief Execute the CCM-Mode encryption algorithm.

0 commit comments

Comments
 (0)