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

Using the random number generator with SDK 15.3

I am trying to use RNG HAL  but I am not sure how to use it and there are (as far as I can tell) no examples. The only thing I need is generating random number. So I'm not using any cryptography, but just need simple random number.

I wrote the code like that:

nrf_rng_task_trigger(NRF_RNG_TASK_SET);
uint8_t value = nrf_rng_random_value_get();

But apparently I'm missing something. I have also added #define RNG_ENABLED 1 to sdk_config.h

Any suggestions what to do?

Thanks.

Parents Reply Children
No Data
Related