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
  • NRF_RNG->EVENTS_VALRDY is a hardware event. It Will be set to non zero when the random generator had finished generating a number.

    Note that the current version of the hardware has some faults. There will be no new number generated after the first. You meed to stop the generator and restart it again to get a new random number. See the PAN-028 document.

Reply
  • NRF_RNG->EVENTS_VALRDY is a hardware event. It Will be set to non zero when the random generator had finished generating a number.

    Note that the current version of the hardware has some faults. There will be no new number generated after the first. You meed to stop the generator and restart it again to get a new random number. See the PAN-028 document.

Children
No Data
Related