Random Number Generator (RNG)
6-4
Freescale Semiconductor
MCF52235 ColdFire® Integrated Microcontroller Reference Manual, Rev. 6
6.2.3
RNG Entropy Register (RNGER)
The RNGER is a write-only register which allows the user to insert entropy into the RNG. This register
allows an external user to continually seed the RNG with externally generated random data. Although use
of this register is recommended, it is optional. The RNGER can be written at any time during operation.
Each time the RNGER is written, the value updates the internal state of the RNG. The update is performed
in such a way that the entropy in the RNG’s internal state is preserved. Use of the RNGER can increase
the entropy but never decrease it.
6.2.4
RNG Output FIFO (RNGOUT)
The RNGOUT provides temporary storage for random data generated by the RNG. As long as RNGOUT
is not empty, a read of this address returns 32 bits of random data. If RNGOUT is read when it is empty,
RNGSR[EI, FUF, LRS] are set. If the interrupt is enabled in RNGCR, an interrupt is triggered to the
interrupt controller. The RNGSR[OFL], described in
Section 6.2.2, “RNG Status Register (RNGSR)
be polled to monitor if data is currently resident in RNGOUT. A new random word pushes into the FIFO
every 256 clock cycles (as long as RNGOUT is not full). It is very important to poll RNGSR[OFL] to make
sure random values are present before reading from RNGOUT.
1
LRS
Last read status. Reflects status of most recent read of RNGOUT.
0 During last read, RNGOUT was not empty.
1 During last read, RNGOUT was empty (underflow condition).
0
SV
Security violation. When enabled by RNGCR[HA], signals that a RNGOUT underflow has occurred. Bit is sticky and
is only cleared by hardware reset.
0 No violation occurred or RNGCR[HA] is cleared.
1 Security violation (RNGOUT underflow) has occurred.
IPSBAR
Offset:
0x1F_0008 (RNGER)
Access: User write-only
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10
9
8
7
6
5
4
3
2
1
0
R
W
ENT
Reset 0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Figure 6-3. RNG Entropy Register (RNGER)
IPSBAR
Offset:
0x1F_000C (RNGOUT)
Access: User read-only
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10
9
8
7
6
5
4
3
2
1
0
R
Random Output
W
Reset 0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Figure 6-4. RNGOUT
Table 6-3. RNGSR Field Descriptions (continued)
Field
Description
Because
of
an
order
from
the
United
States
International
Trade
Commission,
BGA-packaged
product
lines
and
part
numbers
indicated
here
currently
are
not
available
from
Freescale
for
import
or
sale
in
the
United
States
prior
to
September
2010:MCF52234CVM60,
MCF52235CVM60