This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF_ECB->ECBDATAPTR panics

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

Parents
  • 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;

Reply
  • 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;

Children
No Data
Related