30.3.4.2 Checking the Entropy Source
The entropy source may be checked using the three built in test sources: repetition count, 64-sample adaptive proportion, and 4096-
sample adaptive proportion. The entropy source may be tested using the following sequence:
1. Apply a software reset by setting CONTROL_SOFTRESET to 1, then clearing it to 0.
2. Configure the CONTROL register. Important configuration options include:
• Disable test mode by clearing CONTROL_TESTEN to 0.
• Bypass the conditioning function by setting CONTROL_CONDBYPASS to 1.
• Enable the TRNG by setting CONTROL_ENABLE to 1.
3. Check the FIFOLEVEL register to monitor the amount of generated random numbers or wait for the STATUS_FULLIF flag to set,
indicating the FIFO is full. Note that STATUS_FULLIF may be configured to generate an interrupt if desired.
4. When FIFOLEVEL has reached the expected value or when STATUS_FULLIF is set, read the random numbers using the FIFO
register. Those values can be discarded.
5. Continue reading and discarding the random data until at least 4097 x 2 bits (257 x 32-bit words) have been read. This ensures
that enough time has passed for the longest test to run.
6. Check the STATUS register for error flags.
30.3.4.3 Programming a Random Key
1. Check the FIFOLEVEL register to monitor the amount of generated random numbers or wait for the STATUS_FULLIF flag to set,
indicating the FIFO is full. Note that STATUS_FULLIF may be configured to generate an interrupt if desired.
2. When FIFOLEVEL has reached the expected value or when STATUS_FULLIF is set, read the random numbers using the FIFO
register.
3. Use four 32-bit random values to program a random key to the KEY0, KEY1, KEY2, and KEY3 registers.
4. Apply a software reset by setting CONTROL_SOFTRESET to 1, then clearing it to 0. This will flush the FIFO data.
30.3.4.4 Reading Samples
1. Check the FIFOLEVEL register to monitor the amount of generated random numbers or wait for the STATUS_FULLIF flag to set,
indicating the FIFO is full. Note that STATUS_FULLIF may be configured to generate an interrupt if desired.
2. When FIFOLEVEL has reached the expected value or when STATUS_FULLIF is set, read the random numbers using the FIFO
register.
30.4 Register Map
The offset register address is relative to the registers base address.
Offset
Name
Type
Description
RW
R(a)
R
RW
RW
RW
RW
RW
RWH
RW
R(a)
Reference Manual
TRNG - True Random Number Generator
silabs.com
| Building a more connected world.
Rev. 1.1 | 1015