nRF5 SDK is not maintained anymore
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf_cc310 and ARM TrustZone CryptoCell in interrupt mode

Does the nrf_cc310 support interrupt operation? I want to start the calculation of a hash/asymmetric signature but don't want that the CPU busy-waits until the calculation is complete? I cannot find an example for that in /examples/crypto/nrf_cc310/.

Parents
  • Hi,

    The CC310 runtime library use interrupts internally, but the API calls are still blocking. This is achieved by the library calling __WFE() internally when waiting for events. During this time the CPU can sleep or other interrupts can be serviced. There is also some use of busy-waits in a few special cases, but only for very short waits.

  • Thank you for the fast response Einar!
    For me it is not clear why Nordic has integrated the CryptoCell peripheral. From this post (devzone.nordicsemi.com/.../184195 it is clear that CryptoCell doesn't provide significant speed benefits compared to software libraries such as oberon. In some cases CryptoCell is even slower than the software libraries. I was expecting that the benefit of CryptoCell is that the CPU is free for other operations when the CryptoCell  runs but this is apparently not the case.

    The only benefit which I can imagine now is that CryptoCell is very energy efficient but according to the same post above Nordic doesn't have numbers for that.

  • Hi,

    The performance of CC310 compared to SW implementations depend significantly on the algorithm, size of data etc. For instance you will get a huge benefit when calculating SHA256 over a larger buffer.

    This is a comparison of SHA256 with message length 4123 for two backends:

    • Oberon: 4.7413ms
    • CC310: 0.1596ms
Reply Children
Related