cancel
Showing results for 
Search instead for 
Did you mean: 

Random number generator (RNG)

brian239955_st
Associate II
Posted on September 10, 2015 at 10:41

Im using the stm32f407vg discovery board, and coocox is my ide.

Im trying to use Random number generator (RNG) to generate true random number.

Please see code attached.

When i run it, it get stuck in  ''while(RNG_GetFlagStatus(RNG_FLAG_DRDY)== RESET)'' loop, ie number isnt ready to be read.

Am I missing the setup of some register.

#stm32f407-random-number-generate
1 REPLY 1
Posted on September 10, 2015 at 12:24

RNG has clock from PLL48CLK, so you have to have PLL running and PLLQ set adequately.

RNG is one of the things which can be debugged by directly writing/reading registers in the debugger.

JW