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

non-random behaviour

Hi,

I'm trying to generate some time variant values for testing purposes... rand() always returns 1447534768! This is in the proximity app FWIW.

So, I thought I would use the hardware RNG, looking at the example rng_example. Now:


NRF_RNG->TASKS_START=1;
...
NRF_RNG->EVENTS_VALRDY=0;
while(NRF_RNG->EVENTS_VALRDY==0) {}

Just waits for ever?

Alan

Parents
  • Are there any docs or examples available beyond these signatures?

    
    uint32_t sd_rand_application_pool_capacity_get  ( uint8_t *  p_pool_capacity )  
    
    

    Parameters [out] p_pool_capacity The capacity of the pool. Returns NRF_SUCCESS

    
    uint32_t sd_rand_application_bytes_available_get  ( uint8_t *  p_bytes_available )  
    
    

    Parameters [out] p_bytes_available The number of bytes currently available in the pool. Returns NRF_SUCCESS

    Alan

Reply
  • Are there any docs or examples available beyond these signatures?

    
    uint32_t sd_rand_application_pool_capacity_get  ( uint8_t *  p_pool_capacity )  
    
    

    Parameters [out] p_pool_capacity The capacity of the pool. Returns NRF_SUCCESS

    
    uint32_t sd_rand_application_bytes_available_get  ( uint8_t *  p_bytes_available )  
    
    

    Parameters [out] p_bytes_available The number of bytes currently available in the pool. Returns NRF_SUCCESS

    Alan

Children
No Data
Related