# SAM3XA TRNG

## True Random Number Generator (TRNG) User Interface

### Registers

Register Mapping
Address | Register | Name | Access | Reset
--- | --- | --- | --- | ---
0x400BC000 | Control Register | TRNG_CR | write-only | -
0x400BC010 | Interrupt Enable Register | TRNG_IER | write-only | -
0x400BC014 | Interrupt Disable Register | TRNG_IDR | write-only | -
0x400BC018 | Interrupt Mask Register | TRNG_IMR | read-only | 0x00000000
0x400BC01C | Interrupt Status Register | TRNG_ISR | read-only | 0x00000000
0x400BC050 | Output Data Register | TRNG_ODATA | read-only | 0x00000000

### Register Fields

#### TRNG Control Register

Name: TRNG_CR

Access: write-only

Address: 0x400BC000

31 | 30 | 29 | 28 | 27 | 26 | 25 | 24
KEY
23 | 22 | 21 | 20 | 19 | 18 | 17 | 16
KEY
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8
KEY
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
- | - | - | - | - | - | - | ENABLE

- ENABLE: Enables the TRNG to provide random values

  Value | Name | Description
  --- | --- | ---
  0 | - | Disables the TRNG.
  1 | - | Enables the TRNG.

- KEY: Security Key

-

#### TRNG Interrupt Enable Register

Name: TRNG_IER

Access: write-only

Address: 0x400BC010

31 | 30 | 29 | 28 | 27 | 26 | 25 | 24
- | - | - | - | - | - | - | -
23 | 22 | 21 | 20 | 19 | 18 | 17 | 16
- | - | - | - | - | - | - | -
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8
- | - | - | - | - | - | - | -
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
- | - | - | - | - | - | - | DATRDY

- DATRDY: Data Ready Interrupt Enable

  Value | Name | Description
  --- | --- | ---
  0 | - | No effect.
  1 | - | Enables the corresponding interrupt.

#### TRNG Interrupt Disable Register

Name: TRNG_IDR

Access: write-only

Address: 0x400BC014

31 | 30 | 29 | 28 | 27 | 26 | 25 | 24
- | - | - | - | - | - | - | -
23 | 22 | 21 | 20 | 19 | 18 | 17 | 16
- | - | - | - | - | - | - | -
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8
- | - | - | - | - | - | - | -
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
- | - | - | - | - | - | - | DATRDY

- DATRDY: Data Ready Interrupt Disable

  Value | Name | Description
  --- | --- | ---
  0 | - | No effect.
  1 | - | Disables the corresponding interrupt.

#### TRNG Interrupt Mask Register

Name: TRNG_IMR

Access: read-only

Address: 0x400BC018

31 | 30 | 29 | 28 | 27 | 26 | 25 | 24
- | - | - | - | - | - | - | -
23 | 22 | 21 | 20 | 19 | 18 | 17 | 16
- | - | - | - | - | - | - | -
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8
- | - | - | - | - | - | - | -
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
- | - | - | - | - | - | - | DATRDY

- DATRDY: Data Ready Interrupt Mask

  Value | Name | Description
  --- | --- | ---
  0 | - | The corresponding interrupt is not enabled.
  1 | - | The corresponding interrupt is enabled.

#### TRNG Interrupt Status Register

Name: TRNG_ISR

Access: read-only

Address: 0x400BC01C

31 | 30 | 29 | 28 | 27 | 26 | 25 | 24
- | - | - | - | - | - | - | -
23 | 22 | 21 | 20 | 19 | 18 | 17 | 16
- | - | - | - | - | - | - | -
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8
- | - | - | - | - | - | - | -
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
- | - | - | - | - | - | - | DATRDY

- DATRDY: Data Ready

  Value | Name | Description
  --- | --- | ---
  0 | - | Output data is not valid or TRNG is disabled.
  1 | - | New Random value is completed.

#### TRNG Output Data Register

Name: TRNG_ODATA

Access: read-only

Address: 0x400BC050

31 | 30 | 29 | 28 | 27 | 26 | 25 | 24
ODATA
23 | 22 | 21 | 20 | 19 | 18 | 17 | 16
ODATA
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8
ODATA
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
ODATA

- ODATA: Output Data

-