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

What's the maximum time between random numbers on the RNG peripheral?

What's the maximum time between random numbers being generated on the nRF52832's RNG? The datasheet just says

The time needed to generate one random byte of data is unpredictable, and may vary from one byte to the next. This is especially true when bias correction is enabled.

But how much "unpredictability" are we talking here? What's the maximum time between generated numbers? 50 milliseconds? 1 second? Unlimited?

Parents
  • I just ran a quick 'n dirty experiment on the dev kit. I toggled a GPIO inside of the RNG VALRDY interrupt and looked at it on the scope. After running for a few minutes, it looks like the max time is 35µs and min is 31µs with bias correction off (CONFIG = 0). With bias correction on, max time is 2.27ms and min time is 74µs. There's something going wrong with my code. I don't think the RNG is malfunctioning.

Reply
  • I just ran a quick 'n dirty experiment on the dev kit. I toggled a GPIO inside of the RNG VALRDY interrupt and looked at it on the scope. After running for a few minutes, it looks like the max time is 35µs and min is 31µs with bias correction off (CONFIG = 0). With bias correction on, max time is 2.27ms and min time is 74µs. There's something going wrong with my code. I don't think the RNG is malfunctioning.

Children
Related