English
Language : 

SAM4L Datasheet, PDF (945/1185 Pages) ATMEL Corporation – ATSAM ARM-based Flash MCU
ATSAM4L4/L2
35. True Random Number Generator (TRNG)
Rev: 1.0.3.0
35.1 Features
• Passed NIST Special Publication 800-22 Tests Suite
• Passed Diehard Random Tests Suite
• Provides a 32-bit Random Number Every 84 Clock Cycles
35.2 Overview
The True Random Number Generator provides 32-bit random numbers.
35.3
Functional Description
The True Random Number Generator (TRNG) passes the American NIST Special Publication
800-22 and Diehard Random Tests Suites.
As soon as the TRNG is enabled (writing the ENABLE bit in the CR register with the correct
KEY), the generator provides one 32-bit value every 84 clock cycles. An Interrupt can be
enabled through the IER register (respectively disabled in IDR). This interrupt is set when a new
random value is available and is cleared when the Interrupt Status Register is read (ISR). The bit
DATRDY in ISR is set when the random data is ready to be read out on the 32-bit output data
register (ODATA).
The user should check that the DATRDY bit is one before readin the ODATA register when a 32-
bit random value is required.
Figure 35-1. TRNG Data Generation Sequence
clock
trng_cr
enable
trng_int
84 clock cycles
84 clock cycles
Read TRNG_ISR
Read TRNG_ODATA
84 clock cycles
Read TRNG_ISR
Read TRNG_ODATA
42023C–SAM–02/2013
945