When not using the [SP 800-90A] AES-256 DRBG, the startup sequence is relatively straightforward and the engine will generate data automatically to keep the output register and buffer RAM filled:
- Make sure the engine is idle by writing zeroes to the TRNG_CONTROL
register twice.
- Write all configuration values in the TRNG_CONFIG
and TRNG_ALARMCNT
registers, write zeroes to the TRNG_ALARMMASK
and TRNG_ALARMSTOP
registers.
- Enable all FROs in the TRNG_FROENABLE
register (note that this can only be done after clearing the TRNG_ALARMSTOP
register).
- Start the actual engine by setting the TRNG_CONTROL[10] ENABLE_TRNG register bit. Set all required _MASK
interrupt mask bits in the TRNG_CONTROL
register.
- Optionally, when buffer RAM is configured: Set a data available interrupt
threshold using the [31] LOAD_THRESH and [30-24] BLOCKS_THRESH fields of the
TRNG_INTACK
register. This allows delaying the data available interrupt until the indicated
number of 128-bit words are available in the buffer RAM.
- Wait until a data word is available in the TRNG_OUTPUT_0
through TRNG_OUTPUT_3
registers (using the interrupt and/or the TRNG_STATUS[0]
READY status register bit).
- If secure reading is enabled (with TRNG_CONFIG
[15-12] READ_TIMEOUT register field value non-zero), enable the reading by using
the [15-0] OPEN_READ_GATE field or [12] OPEN_READ_GATE2 bit in the TRNG_INTACK
register.
- Read the random data from the TRNG_OUTPUT_0
through TRNG_OUTPUT_3
registers, then acknowledge the read by writing a '1' to the TRNG_INTACK[0]
READY_ACK register bit.
- If more data is needed, go back to steps 5 or 6 above.