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

random number generator available always get 0

I have use random number generator in S110, the source code just like:

uint8_t num_rand_bytes_available;
err_code = sd_rand_application_bytes_available_get(&num_rand_bytes_available);
APP_ERROR_CHECK(err_code);
//if there is a randon number available
if(num_rand_bytes_available > 0)
     {
          err_code = sd_rand_application_vector_get(&random_number, 1);
          APP_ERROR_CHECK(err_code);
     }

but I always get 0 of num_rand_bytes_available, and never get any random number. Is there any error when I use the function sd_rand_application_bytes_available_get(), or I missed anything? Thanks.

Parents Reply Children
No Data
Related