Hi,
I'm trying to interface to a third-party 802.15.4 RF chip using an nRF52833, where the received packets from the remote device have enabled AES-CTR encryption.
I started the process by developing using a nRF52840 as we had the development kit to hand whilst waiting for the 52833 devkit to arrive. I had good success here; I adapted the 802.15.4 PHY test tool to receive and process unencrypted packets and output the received data over the UART. Then I sent data received over UART back to the third-party device and could see this being received.
I then added code adapted from the aes-ctr example to successfully decrypt packets where necessary and output that data over UART. All good so far.
The nRF52833 devkit has now arrived and I'm trying to get the same code working on this micro, as it is our intended target. I made an additional project for the same source code that targets the nRF52833DK and built this. The resultant code is different as expected, what with the 52833 missing the CryptoCell peripheral. It builds fine, but when I run the exe I get a Recursive Spinlock assertion failure that appears to come from the call to psa_crypto_init()
.
Firstly, this is obviously a problem and I could do with some help of what else I need to change (e.g. in prj.conf) to stop this from happening. I assume this library is supported on the 52833.
Secondly, what I found interesting was that if I built the software for the nRF52840, that would run without issue on the '33 and decrypt data successfully. If this library was dependent on the CryptoCell peripheral then I'd have expected this to fail. Can this be explained?
Lastly, can you confirm that what I'm trying to do (802.15.4 with AES-CTR encryption/decryption) is valid and possible on the 52833?
The lines below are those I added to prj.conf for the AES decryption.
CONFIG_MBEDTLS_LIBRARY_NRF_SECURITY=y
CONFIG_NORDIC_SECURITY_BACKEND=y
CONFIG_MBEDTLS_PSA_CRYPTO_C=y
CONFIG_MBEDTLS_ENABLE_HEAP=y
CONFIG_MBEDTLS_HEAP_SIZE=8192
Thanks,
Chris