True random number generator (RNG) RM0440
834/2126 RM0440 Rev 4
Health checks
This component ensures that the entire entropy source (with its noise source) starts then
operates as expected, obtaining assurance that failures are caught quickly and with a high
probability and reliability.
The RNG implements the following health check features.
1. Continuous health tests, running indefinitely on the output of the noise source
– Repetition count test, flagging an error when:
a) One of the noise source has provided more than 64 consecutive bits at a constant
value (“0” or “1”), or more than 32 consecutive occurrence of two bits patterns
(“01” or “10”)
b) Both noise sources have delivered more than 32 consecutive bits at a constant
value (“0” or “1”), or more than 16 consecutive occurrence of two bits patterns
(“01” or “10”)
2. Vendor specific continuous test
– Real-time “too slow” sampling clock detector, flagging an error when one RNG
clock cycle is smaller than AHB clock cycle divided by 32.
The CECS and SECS status bits in the RNG_SR register indicate when an error condition is
detected, as detailed in Section 26.3.7: Error management.
Note: An interrupt can be generated when an error is detected.
26.3.4 RNG initialization
The RNG simplified state machine is pictured on Figure 181
After enabling the RNG (RNGEN=1 in RNG_CR) the following chain of events occurs:
1. The analog noise source is enabled, and logic immediately starts sampling the analog
output, filling 128-bit conditioning shift register
2. The conditioning logic is enabled and post-processing context is initialized using two
128 noise source bits.
3. The conditioning stage internal input data buffer is filled again with 128-bit and one
conditioning round is performed. The output buffer is then filled with post processing
result.
4. The output buffer is refilled automatically according to the RNG usage.