True random number generator (RNG)
RNG
Config.
A
B
1. When writing this register magic number 0x17590ABC must be written immediately before the indicated
value
2. Corresponds to 42 for repetition tests and 628 for adaptive tests. See
details
20.6.3
Data collection
In order to run statistical tests it is required to collect samples from the entropy source at raw
data level as well as at the output of the entropy source. For details on data collection and
the running of statistical test suites refer to "STM32 microcontrollers random number
generation validation using NIST statistical test suite" application note (AN4230) available
from www.st.com.
Contact STMicroelectronics if above samples need to be retrieved for the product.
20.7
RNG registers
The RNG is associated with a control register, a data register and a status register.
20.7.1
RNG control register (RNG_CR)
Address offset: 0x000
Reset value: 0x0080 0000
31
30
29
CONFI
COND
Res.
Res.
GLOCK
RST
rs
rw
15
14
13
RNG_CONFIG2[2:0]
NISTC
rw
rw
rw
538/1306
Table 119. RNG configurations
RNG_
NISTC
CLKDIV
CONFIG1
bit
[5:0]
0
0x0F
1
0x18
28
27
26
25
Res.
Res.
rw
12
11
10
9
RNG_CONFIG3[3:0]
rw
rw
rw
rw
RNG_CR bits
RNG_
CONFIG2
CONFIG3
[3:0]
[2:0]
0x0
0x0
0x0
0x0
24
23
22
RNG_CONFIG1[5:0]
rw
rw
rw
8
7
6
Res.
Res.
rw
RM0461 Rev 5
Loop
RNG_
number
CED
(N)
bit
[3:0]
0xD
0
2
0x0
0
1
Health checks on page 532
21
20
19
18
CLKDIV[3:0]
rw
rw
rw
rw
5
4
3
2
CED
Res.
IE
RNGEN
rw
rw
rw
RM0461
RNG_
HTCR
(1)
register
0x0000
(2)
AA74
0x0000
AA74
for
17
16
rw
rw
1
0
Res.
Res.
Need help?
Do you have a question about the STM32WLEx and is the answer not in the manual?