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

nRF52840 nRF Connect SDK/Zephyr random number generation

Hi,

Looking for some guidance on how to use the 'cryptographically secure random number generator' in a Zephyr/nRF Connect SDK application on an 52840

Is this a supported combination? I found some older devzone posts about this being in development (https://devzone.nordicsemi.com/f/nordic-q-a/45500/nrf52840-and-cc310-random-number-generator-hanging/179228#179228)

Enabling CSPRNG_GENERATOR_CHOICE requires some other backend/driver options to be enabled. It seems there are multiple options here, are there examples available? What is the advised combination here?

Best regards,

-Bastiaan

Parents Reply
  • Hi Marte,

    Thanks! But, one more question, though...

    Can you quide me through how to enable/use this? I'm a newbie to both zephyr and it's build-system, so I'm probably missing a lot of stuff that should be obvious here...

    The API documentation says "When used on nRF52840, the entropy_cc310 driver gathers entropy by using the CC310 hardware through the nrf_cc310_platform library.". That seems to be the NRF_CC310_PLATFORM config setting, which says 'to use, link with nrfxlib_crypto in CMAKE'. How to i do that?

    I did try to implement some entropy-code (with zephyr\samples\drivers\entropy as an example), but sofar I can't get that to work...

    device_get_binding("HW_CC310_0");

    cannot find the device: The device exists, but the binding fails because dev->driver_api is null in z_impl_device_get_binding

Children
Related