14. True random number generator (TRNG)

14.1 Overview

The true random number generator (TRNG) is a hardware module able to generate a random sequence of bits.

The TRNG is based on an analog source of entropy composed by free 9 running ring oscillators. The outputs of those oscillators are XORed and sampled for providing random bits which are then processed by a digital stage.

The digital stage implements an AES-CMC core and is compliant with NIST SP800-90B specifications.

14.2 Features

The TRNG has the following features:

14.3 TRNG block diagram

The TRNG design includes an AHB Bus interface implementing configuration and control registers, an output FIFO, the analog source of entropy and the digital stage of post processing.

Figure 24 describes the TRNG core embedded inside the TRNG Core Block.

Figure 24. TRNG core embedding in the TRNG Core Block

Block diagram of the TRNG core showing the SYSTEM CLOCK DOMAIN and TRNG CLOCK DOMAIN. The SYSTEM CLOCK DOMAIN includes the AHB INTERFACE, Random words Counter, SYNC FIFO, AES CMAC, and various control registers. The TRNG CLOCK DOMAIN includes the Sync To TRNG Domain, clock divider, Health monitor, Sampler, and three oscillator blocks (OSC1_3, OSC2_3, OSC3_3) with health tests and XOR outputs.

The diagram illustrates the internal architecture of the TRNG core, divided into two main clock domains: the SYSTEM CLOCK DOMAIN and the TRNG CLOCK DOMAIN.

SYSTEM CLOCK DOMAIN:

TRNG CLOCK DOMAIN:

Additional signals shown include rng_sampled_osc_o, rng_osc_o, and rng_val_i.

Block diagram of the TRNG core showing the SYSTEM CLOCK DOMAIN and TRNG CLOCK DOMAIN. The SYSTEM CLOCK DOMAIN includes the AHB INTERFACE, Random words Counter, SYNC FIFO, AES CMAC, and various control registers. The TRNG CLOCK DOMAIN includes the Sync To TRNG Domain, clock divider, Health monitor, Sampler, and three oscillator blocks (OSC1_3, OSC2_3, OSC3_3) with health tests and XOR outputs.

MSv55591V1

14.4 TRNG functional description

The slave interface includes all the TRNG memory mapped registers.

The CPU enables the TRNG by resetting bit DISABLE of TRNG_CR unless already enabled (default is TRNG enabled after reset). TRNG startup always begins with health tests of the analog source and the digital post processing.

After the TRNG IP is disabled, by setting CR.DISABLED, in order to properly restart the TRNG IP, the AES_RESET bit must be set to 1 (that is, resetting the AES core and restarting all health tests).

If any error is detected during the health test step, TRNG stops and set errors flags in RNG_SR and RNG_POSTP_SR registers. If no error is found, then TRNG generates random that are used for initializing the AES-based post processing.

When initialization is completed, TRNG starts generating random numbers. TRNG is continuously running and valid Random values are stored in an internal four 32-bit FIFO. It is possible to force a new TRNG reinitialization after generation of a specific number of random numbers as defined in register RNG_POSTP_CR.

CPU must poll FIFO status bits FIFO_FULL and VAL_READY in TRNG_SR before reading random values.

TRNG includes an internal clock enable divider that can be set by bits CLKDIV0 to CLKDIV15 of TRNG_CR register. It is used for decreasing internal random source sampling. Before changing the clock divider, it is recommended to disable the TRNG bit setting bit DISABLE to 1. Due to resynchronization latency between system clock domain and TRNG core clock domain, the value of DISABLE bit reflects the written value when it has been seen by the TRNG core clock domain.

Note: To use the TRNG peripheral the system clock frequency must be at least 32 MHz

For the same reasons, a new divider value can be written provided that both clock domains have the same old value. While the new divider value is being resynchronized with the TRNG core clock domain, it is not possible to write another new value. Consequently, the user must read the RNG_CR register and check that the divider value is equal to the one it has just written. If not, it must redo the write and checking.

Error flags in TRNG_SR reflect the current status of the TRNG core and not the random values stored in the FIFO. No value is stored if TRNG core is in error.

Health tests of analog noise source run continuously but contrary to initialization step, an error detection does not stop random generation but only sets error flags. These error flags can be reset by writing bit RST_HEALTH_FLAGS of TRNG_CR register. When set, this bit remains at 1 until its value has been seen in TRNG core clock domain. Then it is automatically reset.

Heath test of digital post processing can be triggered on-demand by setting bit AES_RESET of RNG_POSTP_CR. When set, this bit remains at 1 until its value has been seen in TRNG core clock domain. Then it is automatically reset. This also triggers the restart of health tests of analog noise source.

As a general comment, any modification of control and configuration bits of TRNG Control registers that impact TRNG core applies in TRNG clock domain after some latency inherent to clock domain resynchronization.

Similarly, any flag or result generated in TRNG clock domain is seen with some latency in system clock delay. However, this latency is shorted as system clock frequency is much higher than TRNG one.

14.5 TRNG register access

The TRNG can only be accessed using 32-bit (word) accesses. References using a different size are invalid.

14.6 Memory map

The TRNG memory map is shown in the following table.

Table 77. TRNG memory map and address offsets

OffsetRegister description (register name)
0x000Core Control Register (TRNG_CR)
0x004Core Status Register (TRNG_SR)
0x00832-bit Random Value (TRNG_VAL)
0x030Oscillator Control Register (TRNG_OSCS_CR)
0x034Post Processing Control Register (TRNG_POSTP_CR)
0x038Post Processing Status Register (TRNG_POSTP_SR)
0x040Bits 31 to 0 of AES 128-bit Default Key (TRNG_DEFKEY0)
0x044Bits 63 to 32 of AES 128-bit Default Key (TRNG_DEFKEY1)
0x048Bits 95 to 64 of AES 128-bit Default Key (TRNG_DEFKEY2)
0x04CBits 127 to 96 of AES 128-bit Default Key (TRNG_DEFKEY3)
0x060Health Test Control Register (TRNG_HEALTH_CR)
0x068OSC1 Health Tests Control Register (TRNG_HEALTH_OSC1_CR)
0x06COSC2 Health Tests Control Register (TRNG_HEALTH_OSC2_CR)
0x070OSC3 Health Tests Control Register (TRNG_HEALTH_OSC3_CR)
0x074OSC1 Health Tests Status Register (TRNG_HEALTH_OSC1_SR)
0x078OSC2 Health Tests Status Register (TRNG_HEALTH_OSC2_SR)
0x07COSC3 Health Tests Status Register (TRNG_HEALTH_OSC3_SR)

Table 77. TRNG memory map and address offsets

OffsetRegister description (register name)
0x080TRNG Interrupt Control Register (TRNG_IRQ_CR)
0x084Interrupt Status Register (TRNG_IRQ_SR)

14.7 TRNG registers

The following sections detail the individual registers within the TRNG programming model.

14.7.1 Core Control Register (TRNG_CR)

Address: BaseAddress + 0x000

Type: R/W

Reset value: 0x0000_FF00

Description: Core Control Register

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.CLKDIV
rrrrrrrrrwrwrwrwrwrwrwrw
1514131211109876543210
CLKDIVRST_HEALTH_FLAG_SCLR_REVCLK_FLAGRes.Res.Res.Res.Res.DISABLE
rwrwrwrwrwrwrwrwrwrwrrrrrrw

Bits 31:24 Reserved, must be kept at reset value.

Bits 23:8 CLKDIV: Sampling Clock Enable Divider.

CLKDIV[15:0] control the sampling clock enable divider, dividing by a factor equal to CLKDIV[15:0] + 1, values being in the range of 1 to 65536.

NB: A new value can be set if current value is visible by both clock domains otherwise write fails.

Bit 7 RST_HEALTH_FLAGS: Reset Health error flags when writing a “1” without resetting the whole TRNG.

0: no reset

1: reset health flag

When writing a 1, the value remains until it is seen by RNG core clock domain after resynchronization. Then it is automatically reset.

Bit 6 CLR_REVCLK_FLAG: Clear reveal clock error flags when writing a “1” without resetting the whole TRNG. 0: no reset

1: Clear revclk flag

Bits 5:1 Reserved, must be kept at reset value.

Bit 0 DISABLE:

Bit DISABLE can be used for reading or setting the state of the TRNG core. The value read is always the one available at the rng core clock domain.

0: The RNG core is enabled 1: The RNG core is disabled

When changing the value, the change is effective when the value read is the same as the one written.

14.7.2 Core Status Register (TRNG_SR)

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.OSCS_ADAPT_ERROROSCS_REPET_ERROROSCS_HEALTH_DONEADAPT_ERRORREPET_ERRORSRC_HEALTH_DONERes.Res.Res.Res.
rrrrrrrrrrrrrrrr
15141312119876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.FIFO_FULLVAL_READYENTROPY_ERRREVEAL_CLK_ERRALL_OSCS_DOWNTRNG_DISABLED
rrrrrrrrrrrrrrrr

Address: BaseAddress + 0x004

Type: R/W

Reset value: 0x0

Description: Core Status Register

Bits 31:26 Reserved, must be kept at reset value.

Bit 25 OSCS_ADAPT_ERROR :

Logical OR of adaptive health test errors of individual oscillators composing the noise source.

Bit 24 OSCS_REPET_ERROR : Logical OR of repetition health test errors of individual oscillators composing the noise source.Bit 23 OSCS_HEALTH_DONE :

First run of source health tests of individual oscillators composing the noise source are completed.

Bit 22 ADAPT_ERROR : Noise source Adaptive health test errorBit 21 REPET_ERROR : Noise source Repetition health test errorBit 20 SRC_HEALTH_DONE : First run of noise source health test is completed

Bits 19:6 Reserved, must be kept at reset value.

Bit 5 FIFO_FULL : Indicates whether random data FIFO is full. 0: FIFO is not full.
1: The internal data FIFO is full and four 32:bit random values can be read.Bit 4 VAL_READY : TRNG Value ready

At least one 32-bit random value is available in the data FIFO. Note that application must ensure that a random is available in internal FIFO by reading the VAL_READY flag before starting a read, otherwise a null value is returned.

0: No value is ready in FIFO.

1: A 32-bit value is available in the internal FIFO

Bit 3 ENTROPY_ERR : The error reported refers to a fault in the bit sequence detected by the Entropy Monitor. Failed test is given by REPET_ERROR, ADAPT_ERROR, OSCS_REPET_ERROR and OSCS_ADAPT_ERROR status flags.

0: No fault detected.

1: Embedded health monitor detects an error in bit stream quality

14.7.3 32-bit Random Value (TRNG_VAL)

Address: BaseAddress + 0x008

Type: R

Reset value: 0x0

Description: 32-bit Random Value

31302928272625242322212019181716
RND_VAL
rrrrrrrrrrrrrrrr
1514131211109876543210
RND_VAL
rrrrrrrrrrrrrrrr

Bits 31:0 RND_VAL: a 32-bit Random Value. This is the output of the internal four-word FIFO.

Note that application must ensure that a random value is available in the FIFO by reading the VAL_READY flag before starting a read, otherwise a null value is returned.

14.7.4 Oscillator Control Register (TRNG_OSCS_CR)

31302928272625242322212019181716
SYNC_OSCSRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rwrrrrrrrrrrrrrrr
1514131211109876543210
Res.Res.Res.Res.Res.Res.PWRD3PWRD2PWRD1Res.
rrrrrrrwrwrwrwrwrwrwrwrwr

Address: BaseAddress + 0x030

Type: R/W

Reset value: 0x8000_0000

Description: OscillatorControl Register

Bit 31 SYNC_OSCS: When set, selection of resynchronized output of oscillators.

NB: It is recommended to disable TRNG before changing this value.

Bits 30:10 Reserved, must be kept at reset value.

Bits 9:7 PWRD3: Power down of individual oscillators in triple-oscillator block number 3

Bits 6:4 PWRD2: Power down of individual oscillators in triple-oscillator block number 2

Bits 3:1 PWRD1: Power down of individual oscillators in triple-oscillator block number 1

Bit 0 Reserved, must be kept at reset value.

14.7.5 Post Processing Control Register (TRNG_POSTP_CR)

31302928272625242322212019181716
NB_RND_REINIT
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.NB_LOOP_AESRes.Res.Res.Res.Res.Res.Res.AES_RESET
rrrrrwrwrwrwrrrrrrrw

Address: BaseAddress + 0x034

Type: R/W

Reset value: 0x0000_0F00

Description: AES-based post-processing Control Register

Bits 31:16 NB_RND_REINIT: Number of 128-bit random words generated before AES automatically resets. This number is in the range of 1 to 65535 words. Value 0x0000 means that AES is never reinitialized.

NB: It is recommended to disable TRNG before changing this value.

Bits 15:12 Reserved, must be kept at reset value.

Bits 11:8 NB_LOOP_AES: the number of 128-bit words got from the noise source that have to be processed by AES for generating a single 128-bit random word.

By default, this value is set to 2 (128 bits generated before an AES processing). 0 value means 16 loops.

A new AES processing is started only when the previous one is completed. NB: It is recommended to disable TRNG before changing this value.

Bits 7:1 Reserved, must be kept at reset value.

Bit 0 AES_RESET: Reset AES post processing.

When writing a 1, the AES post processing is reinitialized, resulting in a new key and new state generation before 128-bit random words generation. The '1' written is frozen until it is seen by RNG core clock domain after resynchronization. Then it is automatically reset.

It also reruns analog source health tests.

0: No effect

1: Reset AES core

14.7.6 Post Processing Status Register (TRNG_POSTP_SR)

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rrrrrrrrrrrrrrrr
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.AES_D
OUT_E
RROR
AES_K
12_ER
ROR
AES_H
EALTH
_DONE
AES_B
USY
AES_K
EY_LD
AES_I
NIT
Res.
rrrrrrrrrrrrrrrr

Address:BaseAddress + 0x038

Type:R/W

Reset value:0x0000_0000

Description:AES-based Post Processing Status Register.

Bits 31:7 Reserved, must be kept at reset value.

Bit 6 AES_DOUT_ERROR: Health test error on AES-CMAC output generation

Bit 5 AES_K12_ERROR: Health test error on AES-CMAC sub-keys generation

Bit 4 AES_HEALTH_DONE: AES-CMAC health test is completed

Bit 3 AES_BUSY: AES core is busy, generating a random value. 0: AES core is idle
1: AES core is busy

Bit 2 AES_KEY_LD: AES random key has been generated and loaded in AES key register.

0: AES core is waiting for 128 random bits from the entropy sources for generating its key 1:
AES key register has been loaded with a random key

Bit 1 AES_INIT: AES Post processing has been fully initialized (key and state) and is ready for
generating 128- bit random words.

0: AES core is not initialized (no key or state set). 1: AES core is fully initialized.

Bit 0 Reserved, must be kept at reset value.

14.7.7 Bits 31 to 0 of AES 128-bit Default Key (TRNG_DEFKEY0)

Address: BaseAddress + 0x040

Type:R/W

Reset value:0xFFFF FFFF

Description:First part of 128-bit AES Default Key. This register is write-only as it can hold a device-specific key that masks the random key generated from the entropy source.

31302928272625242322212019181716
RNG_DEFKEY0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
RNG_DEFKEY0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 RNG_DEFKEY0: Bits 31 to 0 of AES 128-bit Default Key

14.7.8 Bits 63 to 32 of AES 128-bit Default Key (TRNG_DEFKEY1)

Address:BaseAddress + 0x044

Type:R/W

Reset value: 0xFFFF FFFF

Description: Second part of 128-bit AES Default Key. This register is write-only as it can hold a device-specific key that masks the random key generated from the entropy source.

31302928272625242322212019181716
RNG_DEFKEY1
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
RNG_DEFKEY1
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 RNG_DEFKEY1: Bits 63 to 32 of AES 128-bit Default Key

14.7.9 Bits 95 to 64 of AES 128-bit Default Key (TRNG_DEFKEY2)

Address: BaseAddress + 0x048

Type: R/W

Reset value: 0xFFFF FFFF

Description: Third part of 128-bit AES Default Key. This register is write-only as it can hold a device-specific key that masks the random key generated from the entropy source.

31302928272625242322212019181716
RNG_DEFKEY2
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
RNG_DEFKEY2
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 RNG_DEFKEY2: Bits 95 to 64 of AES 128-bit Default Key

14.7.10 Bits 127 to 96 of AES 128-bit Default Key (TRNG_DEFKEY3)

Address: BaseAddress + 0x04C

Type: R/W

Reset value: 0xFFFF FFFF

Description: Fourth and last part of 128-bit AES Default Key. This register is write-only as it can hold a device-specific key that masks the random key generated from the entropy source.

31302928272625242322212019181716
RNG_DEFKEY3
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
RNG_DEFKEY3
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 RNG_DEFKEY3: Bits 127 to 96 of AES 128-bit Default Key

14.7.11 Health Test Control Register (TRNG_HEALTH_CR)

31302928272625242322212019181716
Res.Res.ITER_ADAPRes.Res.ADAP_CUTOFF
rrrwrwrrrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.REPET_CUTOFF.
rrrrrrrrrwrwrwrwrwrwrwrw

Address: BaseAddress + 0x060

Type: R/W

Reset value: 0x02BB 0033

Description: The TRNG_HEALTH_CR register controls the health test parameters. It must be used with care as bad settings could prevent TRNG to work properly. The default values are valid for all ring oscillators enabled. When powering down some oscillators, the cutoff values must be increased as health tests could trigger an error. When all oscillators but one are powered down, the values should be the same as the ones defined in TRNG_HEALTH_OSCx_CR registers.

Bits 31:30 Reserved, must be kept at reset value.

Bits 29:28 ITER_ADAP: Number of iterations minus 1 of Adaptive test during initialization phase. Default value is set to 0 i.e. 1 iteration.

NB: It is recommended to disable TRNG before changing this value.

Bits 27:26 Reserved, must be kept at reset value.

Bits 25:16 ADAP_CUTOFF: Cutoff value of Adaptive Test. The default value is set to 699.

Caution: To be handled with care as any change can lead to misbehavior of TRNG. NB: It is recommended to disable TRNG before changing this value.

Bits 15:8 Reserved, must be kept at reset value.

Bits 7:0 REPET_CUTOFF: Cutoff value of Repetition Test. The default value is set to 51.

Caution: To be handled with care as any change can lead to misbehavior of TRNG. NB: It is recommended to disable TRNG before changing this value.

14.7.12 OSC1 Health Tests Control Register (TRNG_HEALTH_OSC1_CR)

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.ADAP_CUTOFF_OSC1
rrrrrrrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.REPET_CUTOFF_OSC1
rrrrrrrrrwrwrwrwrwrwrwrw

Address: BaseAddress + 0x068

Type: R/W

Reset value: 0x03E3 00FB

Description: The TRNG_HEALTH_CR register controls the health test parameters of first oscillator in triple-oscillator cells. It must be used with care as bad settings could prevent TRNG to work properly.

Bits 31:26 Reserved, must be kept at reset value.

Bits 25:16 ADAP_CUTOFF_OSC1: Cutoff value of Adaptive Test for first oscillator of triple-oscillator cells. The default value is set to 995.

Caution: To be handled with care as any change can lead to misbehavior of TRNG. NB: It is recommended to disable TRNG before changing this value.

Bits 15:8 Reserved, must be kept at reset value.

Bits 7:0 REPET_CUTOFF_OSC1: Cutoff value of Repetition Test for first oscillator of triple-oscillator cells. The default value is set to 251.

Caution: To be handled with care as any change can lead to misbehavior of TRNG. NB: It is recommended to disable TRNG before changing this value.

14.7.13 OSC2 Health Tests Control Register (TRNG_HEALTH_OSC2_CR)

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.ADAP_CUTOFF_OSC2
rrrrrrrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.REPET_CUTOFF_OSC2
rrrrrrrrrwrwrwrwrwrwrwrw

Address: BaseAddress + 0x06C

Type: R/W

Reset value: 0x03E3 00FB

Description: The TRNG_HEALTH_CR register controls the health test parameters of second oscillator in triple-oscillator cells. It must be used with care as bad settings could prevent TRNG to work properly.

ST logo
ST logo

14.7.14 OSC3 Health Tests Control Register (TRNG_HEALTH_OSC3_CR)

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.ADAP_CUTOFF_OSC3
rrrrrrrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.REPET_CUTOFF_OSC3
rrrrrrrrrwrwrwrwrwrwrwrw

Address: BaseAddress + 0x70

Type: R/W

Reset value: 0x03E3 00FB

Description: The TRNG_HEALTH_CR register controls the health test parameters of third oscillator in triple-oscillator cells. It must be used with care as bad settings could prevent TRNG to work properly.

Bits 31:26 Reserved, must be kept at reset value.

Bits 25:16 ADAP_CUTOFF_OSC3: Cutoff value of Adaptive Test for third oscillator of triple-oscillator cells. The default value is set to 995.

Caution: To be handled with care as any change can lead to misbehavior of TRNG. NB: It is recommended to disable TRNG before changing this value.

Bits 15:8 Reserved, must be kept at reset value.

Bits 7:0 REPET_CUTOFF_OSC3: Cutoff value of Repetition Test for third oscillator of triple-oscillator cells. The default value is set to 251.

Caution: To be handled with care as any change can lead to misbehavior of TRNG. NB: It is recommended to disable TRNG before changing this value.

14.7.15 OSC1 Health Tests Status Register (TRNG_HEALTH_OSC1_SR)

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rrrrrrrrrrrrrrrr
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TO3_A
DAPT_
ERRO
R
TO3_R
EPET_
ERRO
R
TO2_A
DAPT_
ERRO
R
TO2_R
EPET_
ERRO
R
TO1_A
DAPT_
ERRO
R
TO1_R
EPET_
ERRO
R
rrrrrrrrrrrrrrrr

Address:BaseAddress + 0x074

Type: R/W

Reset value: 0x0

Description: OSC1 Health Tests Status Register

ST logo
ST logo

14.7.16 OSC2 Health Tests Status Register (TRNG_HEALTH_OSC2_SR)

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rrrrrrrrrrrrrrrr
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TO3_A
DAPT_
ERRO
R
TO3_R
EPET_
ERRO
R
TO2_A
DAPT_
ERRO
R
TO2_R
EPET_
ERRO
R
TO1_A
DAPT_
ERRO
R
TO1_R
EPET_
ERRO
R
rrrrrrrrrrrrrrrr

Address: BaseAddress + 0x078

Type: R/W

Reset value: 0x0

Description: OSC1 Health Tests Status Register

Bits 31:6 Reserved, must be kept at reset value.

Bit 5 TO3_ADAPT_ERROR: Adaptive error flag of second oscillator of third triple-oscillator cell.

Bit 4 TO3_REPET_ERROR: Repetition error flag of second oscillator of third triple-oscillator cell.

Bit 3 TO3_ADAPT_ERROR: Adaptive error flag of second oscillator of second triple-oscillator cell.

Bit 2 TO2_REPET_ERROR: Repetition error flag of second oscillator of second triple-oscillator cell.

Bit 1 TO1_ADAPT_ERROR: Adaptive error flag of second oscillator of first triple-oscillator cell

Bit 0 TO1_REPET_ERROR: Repetition error flag of second oscillator of first triple-oscillator cell.

14.7.17 OSC3 Health Tests Status Register (TRNG_HEALTH_OSC3_SR)

Address: BaseAddress + 0x07C

Type: R/W

Reset value: 0x0

Description: OSC3 Health Tests Status Register

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rrrrrrrrrrrrrrrr
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TO3_A
DAPT_
ERRO
R
TO3_R
EPET_
ERRO
R
TO2_A
DAPT_
ERRO
R
TO2_R
EPET_
ERRO
R
TO1_A
DAPT_
ERRO
R
TO1_R
EPET_
ERRO
R
rrrrrrrrrrrrrrrr

Bits 31:6 Reserved, must be kept at reset value.

Bit 5 TO3_ADAPT_ERROR : Adaptive error flag of third oscillator of third triple-oscillator cell.Bit 4 TO3_REPET_ERROR : Repetition error flag of third oscillator of third triple-oscillator cell.Bit 3 TO3_ADAPT_ERROR : Adaptive error flag of third oscillator of second triple-oscillator cell.Bit 2 TO2_REPET_ERROR : Repetition error flag of third oscillator of second triple-oscillator cell.Bit 1 TO1_ADAPT_ERROR : Adaptive error flag of third oscillator of first triple-oscillator cellBit 0 TO1_REPET_ERROR : Repetition error flag of third oscillator of first triple-oscillator cell.

14.7.18 TRNG Interrupt Control Register (TRNG_IRQ_CR)

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rrrrrrrrrrrrrrrr
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.EN_ERROR_IRQRes.Res.Res.Res.Res.Res.Res.EN_FF_FULL_IRQ
rrrrrrrrwrrrrrrrrw

Address: BaseAddress + 0x080

Type: R/W

Reset value: 0x0000 0000

Description: The TRNG_IRQ_CR register controls the enabling of interrupt sources.

Bits 31:9 Reserved, must be kept at reset value.

Bit 8 EN_ERROR_IRQ: Enable the interrupt when an error is reported.

Bits 7:1 Reserved, must be kept at reset value.

Bit 0 EN_FF_FULL_IRQ: Enable the interrupt when the output FIFO is full of new random.

14.7.19 Interrupt Status Register (TRNG_IRQ_SR)

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rrrrrrrrrrrrrrrr
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.ERRO
R_IRQ
Res.Res.Res.Res.Res.Res.Res.FF_FU
LL_IRQ
rrrrrrrrwrrrrrrrrw

Address: Base Address+ 0x084

Type: R

Reset value: 0x0000 0000

Description: The TRNG_IRQ_SR register reports the status flags of the interrupt sources.

Bits 31:9 Reserved, must be kept at reset value.

Bit 8 ERROR_IRQ: Set to 1 when an error is reported. Flag is cleared by writing a 1.
This bit is set only if corresponding bit in TRNG_IRQ_CR is set.

Bits 7:1 Reserved, must be kept at reset value.

Bit 0 FF_FULL_IRQ: Set to 1 when the output FIFO is full of new random. It is software responsibility to clear the flag since it is not cleared by hardware when samples are read from the FIFO. The flag is cleared by writing a 1 to it.
This bit is set only if corresponding bit in TRNG_IRQ_CR is set.