Rng Operation; Figure 74. Rng Initialization Overview - ST STM32G0 1 Series Reference Manual

Table of Contents

Advertisement

True random number generator (RNG)
The associated initialization time can be found in
RNGEN=0, then
RNGEN=1
19.3.5

RNG operation

Normal operations
To run the RNG using interrupts the following steps are recommended:
1.
Enable the interrupts by setting the IE bit in the RNG_CR register. At the same time
enable the RNG by setting the bit RNGEN=1.
2.
An interrupt is now generated when a random number is ready or when an error
occurs. Therefore at each interrupt, check that:
464/1390

Figure 74. RNG initialization overview

1
Noise source
2
Conditioning
hardware init
3
Generate samples
4
No error occurred. The SEIS and CEIS bits should be set to 0 in the RNG_SR
register.
A random number is ready. The DRDY bit must be set to 1 in the RNG_SR
register.
If above two conditions are true the content of the RNG_DR register can be read
up to four consecutive times. If valid data is available in the conditioning output
buffer, four additional words can be read by the application (in this case the DRDY
bit is still high). If one or both of above conditions are false, the RNG_DR register
must not be read. If an error occurred error recovery sequence described in
Section 19.3.7
must be used.
Section 19.5: RNG processing
enable
Drop samples then
Continuous test(s)
not OK
RM0444 Rev 5
check again
Error state
RM0444
time.
MSv44203V3

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32G0 1 Series and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF