We've been using CyBle_AesCcmEncrypt and CyBle_AesCcmDecrypt and were getting some random NOMEM global interrupt hangups.
It turns out that you have to check the BLE stack state before calling this function, however the documentation doesn't say this.
So some feedback for users who find themselves in a stack trace containing things like llh_load_encryption_key, wondering how a strh r0,[r1, #0] is causing a memory issue when all parameters are correct and there is sufficient stack and heap available, might find that they need to do something like this:
while((CyBle_GetBleSsState() != CYBLE_BLESS_STATE_EVENT_CLOSE));
eret = CyBle_AesCcmEncrypt(edActiveKey, edActiveNonce, data, chunksize, out, intmic);
At least, this works for me.
Perhaps Cypress can comment on the recommended way of calling the function or checks to do before executing?
Thank you for your observation and feedback. It is recommended.