Hi,
I need to use the cryptocell in a project with a preemptive OS. Are there any relevant code examples available, or at least some general guidelines and precautions (e.g., for the initialization of the cryptocell)?
Thanks,
Damian
Hi,
I need to use the cryptocell in a project with a preemptive OS. Are there any relevant code examples available, or at least some general guidelines and precautions (e.g., for the initialization of the cryptocell)?
Thanks,
Damian
Hi Damian and Jean-Marc,
We are facing the same problem with FreeRtos and the BLE stack. The CC310 is hanging in the SaSi_HalWaitInterrupt.
How did you manege to mask the interrupts? Could you post a snippet of the code or point us in the right direction
Thanks in advance,
Rudy
Hi Damian and Jean-Marc,
We are facing the same problem with FreeRtos and the BLE stack. The CC310 is hanging in the SaSi_HalWaitInterrupt.
How did you manege to mask the interrupts? Could you post a snippet of the code or point us in the right direction
Thanks in advance,
Rudy
Some time after the initial post, I noticed that, in the SDK 15.3, another CC310 library made its appearance: a new folder named "no-interrupts" with a .a file in it. After switching to this library, we didn't experience any problems related to the CC310 and external interrupts. The backside might be that the current consumption might be a bit higher as the processor will actively wait for the crypto-cell to finish, but the CC310 operations are mostly quite short.
Thanks for your quick response, Jean-Marc. We have tried the no interrupt library and it seems to be working fine. I guess that why Nordic made this library for the Rtos. Hopefully they fix this interrupt issue in the future :-)
yours sincerely,
Rudy
Hi Jean,
I tried the above mentioned solution. I am facing the same issue even after adding "no-interrupts" library.
Hi, although a little late here is a snippet that worked for me to mask the basepri:
NVIC_EnableIRQ(CRYPTOCELL_IRQn); NRF_CRYPTOCELL->ENABLE = 1; SaSi_LibInit(); /* First read the current basepri value */ uint32_t prevBasepri = __get_BASEPRI(); /* Mask (disable) all interrupts with priority greater or equal to 1 */ __set_BASEPRI( 1 << ( 8 - __NVIC_PRIO_BITS) ); CRYS_RndInit(&state, &buf); /* Restore the previous basepri */ __set_BASEPRI(prevBasepri);
Related reading where I also posted the snippet: