To check the status of the conditioning function, follow these steps.
- Initiate a software reset by writing 1 to the register RNGCONTROL.CONTROL.SOFTRST.
- Write to the following control registers:
- Write 4 to register CONTROL.NB128BITBLOCKS.
- Write 1 to register CONTROL.TESTEN.
- Write 1 to register CONTROL.FIFOWRITESTARTUP.
- Write 1 to register CONTROL.ENABLE.
- Write the data to the register KEY.
- Write the data to the register TESTDATA. After each write, wait until the TESTDATABUSY flag is low.
- Read the result from the register FIFO.
The following table contains example vectors from section F.2.1 in NIST Special Publication 800-38A.
| 128-bit format | 32-bit APB format | |
|---|---|---|
| Key | 0x2B7E151628AED2A6ABF7158809CF4F3C | 0x16157E2B 0xA6D2AE28 0x8815F7AB 0x3C4FCF09 |
| Input block #1 | 0x6BC0BCE12A459991E134741A7F9E1925 | 0xE1BCC06B 0x9199452A 0x1A7434E1 0x25199E7F |
| Input block #2 | 0xAE2D8A571E03AC9C9EB76FAC45AF8E51 | 0x578A2DAE 0x9CAC031E 0xAC6FB79E 0x518EAF45 |
| Input block #3 | 0x30C81C46A35CE411E5FBC1191A0A52EF | 0x461CC830 0x11E45CA3 0x19C1FBE5 0xEF520A1A |
| Input block #4 | 0xF69F2445DF4F9B17AD2B417BE66C3710 | 0x45249FF6 0x179B4FDF 0x7B412BAD 0x10376CE6 |
| Expected output | 0x3FF1CAA1681FAC09120ECA307586E1A7 | 0xA1CAF13F 0x09AC1F68 0x30CA0E12 0xA7E18675 |