Hi,
I trying to use the AES ECB driver on nRF52. When I init the NRF_ECB->ECBDATAPTR with AES data system just panics. Not clear what's happening.
However the same piece code of works perfect on nRF51 board.
Any hints?
Thanks & Regards, Sharan
Hi,
I trying to use the AES ECB driver on nRF52. When I init the NRF_ECB->ECBDATAPTR with AES data system just panics. Not clear what's happening.
However the same piece code of works perfect on nRF51 board.
Any hints?
Thanks & Regards, Sharan
Hi
Are you able to share the code?
Does the code fail when you try to write to the ECBDATAPTR register, or at a later point?
Best regards
Hi Torbjørn,
It fails in the below function while assigning the data pointer to ECBDATAPTR.
=============== static void aes128_init(const uint8_t *key) { if (key != NULL) { memmove(m_sec.aesdata.key, key, 16); NRF_ECB->ECBDATAPTR = (uint32_t)&m_sec.aesdata; } }
================ struct _m_sec { uint8_t key[16]; uint8_t in[16]; uint8_t out[16]; }aesdata;
Hi
Are you able to assign the pointer to a variable first, and check the value in the debugger?
It would be interesting to see what the address is.
Best regards
This issue resolved after using the SoftDevice APIs for the hardware AES block.
Of course.. I should have thought of that
#facepalm
;)
Good to hear you found the issue.