2022-02-08 11:59 PM
Hi
I am assuming the random numbers generated by the RNG have a uniform distribution.
Is this correct?
Best regards
Rob
Solved! Go to Solution.
2022-02-09 12:41 AM
The STM32H7 has a so-called TRNG (True RNG), which is based on an analogue noise source and has also been certified by NIST (see AN4230). So you can safely assume that the distribution of the generated 32-bit values is highly uniform.
Good luck!
If the problem is resolved, please mark this topic as answered by selecting Select as best. This will help other users find that answer faster.
/Peter
2022-02-09 12:41 AM
The STM32H7 has a so-called TRNG (True RNG), which is based on an analogue noise source and has also been certified by NIST (see AN4230). So you can safely assume that the distribution of the generated 32-bit values is highly uniform.
Good luck!
If the problem is resolved, please mark this topic as answered by selecting Select as best. This will help other users find that answer faster.
/Peter
2022-02-09 03:36 PM
Thanks Peter,
I will move forward on that basis.
I need a normally distributed random noise source so I will take two numbers from the RNG normalise them and produce a normally distributed float using the Box-Muller Transform.
I have attached a copy of the normal distribution code as a zip in case someone else requires a normal distribution. I have a double version and float version.
Best regards
Rob
2022-02-09 03:47 PM
It can generate true random 32bit numbers,
2022-02-09 03:51 PM
Additional:
Using the true random number of the RNG should avoid the problems the Box-Muller Transform has when using pseudo-random numbers. This problem results in poor number generation in the "tails" of the generated normal distribution and is known as the "Neave Effect" after the person who studied it.