PIC32CX2051MTG128 TRNG registers

The 10 registers of TRNG (True Random Number Generator), from 0x4400C000, with their reset value and every field. The PIC32CX2051MTG128 has 2875 registers in 60 peripherals, one page each.

TRNG True Random Number Generator

TRNG_CRControl Register

Address
0x4400C000
Reset
0x00000000
Access
write only
Size
32-bit
2 fields
FieldBitsWhat it does
ENABLE0Enable TRNG to Provide Random Values
WAKEY31:8Register Write Access Key
  • 5393991 Writing any other value in this field aborts the write operation.

TRNG_MRMode Register

Address
0x4400C004
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
HALFR0Half Rate Enable
  • 0 Maximum stream rate provided (1 sample every 84 MCK clock cycles).
  • 1 Half maximum stream rate provided if the peripheral clock frequency is above 100 MHz (1 sample every 168 MCK clock cycles).

TRNG_PKBCRPrivate Key Bus Control Register

Address
0x4400C008
Reset
0x00000000
Access
write only
Size
32-bit
4 fields
FieldBitsWhat it does
KLENGTH15:8Key Length
KSLAVE5:4Key Bus Client
  • 0 AES
  • 1 AESB
KID0Key ID (Must be Always Written to 0)
WAKEY31:16Register Write Access Key
  • 21067 Writing any other value in this field aborts the write operation.

TRNG_IERInterrupt Enable Register

Address
0x4400C010
Reset
0x00000000
Access
write only
Size
32-bit
3 fields
FieldBitsWhat it does
EOTPKB2End Of Transfer on Private Key Bus Interrupt Enable
SECE1Security and/or Safety Event Interrupt Enable
DATRDY0Data Ready Interrupt Enable

TRNG_IDRInterrupt Disable Register

Address
0x4400C014
Reset
0x00000000
Access
write only
Size
32-bit
3 fields
FieldBitsWhat it does
EOTPKB2End Of Transfer on Private Key Bus Interrupt Disable
SECE1Security and/or Safety Event Interrupt Disable
DATRDY0Data Ready Interrupt Disable

TRNG_IMRInterrupt Mask Register

Address
0x4400C018
Reset
0x00000000
Access
read only
Size
32-bit
3 fields
FieldBitsWhat it does
EOTPKB2End Of Transfer on Private Key Bus Interrupt Mask
SECE1Security and/or Safety Event Interrupt Mask
DATRDY0Data Ready Interrupt Mask

TRNG_ISRInterrupt Status Register

Address
0x4400C01C
Reset
0x00000000
Access
read only
Size
32-bit
3 fields
FieldBitsWhat it does
EOTPKB2End Of Transfer on Private Key Bus (cleared on read)
SECE1Security and/or Safety Event (cleared on read)
DATRDY0Data Ready (cleared on read)

TRNG_ODATAOutput Data Register

Address
0x4400C050
Reset
0x00000000
Access
read only
Size
32-bit
1 field
FieldBitsWhat it does
ODATA31:0Output Data

TRNG_WPMRWrite Protection Mode Register

Address
0x4400C0E4
Reset
0x00000000
Access
read/write
Size
32-bit
5 fields
FieldBitsWhat it does
FIRSTE4First Error Report Enable
WPCREN2Write Protection Control Enable
WPITEN1Write Protection Interrupt Enable
WPEN0Write Protection Enable
WPKEY31:8Write Protection Key
  • 5393991 Writing any other value in this field aborts the write operation of bits WPEN, WPITEN and WPCREN. Always reads as 0.

TRNG_WPSRWrite Protection Status Register

Address
0x4400C0E8
Reset
0x00000000
Access
read only
Size
32-bit
7 fields
FieldBitsWhat it does
SWETYP27:24Software Error Type (cleared on read)
  • 0 TRNG is enabled and a write-only register has been read (Warning).
  • 1 TRNG is enabled and a write access has been performed on a read-only register (Warning).
  • 2 Access to an undefined address.
  • 3 The TRNG_ODATA register was read when TRNG was disabled or TRNG used for private key bus transfer (Error).
  • 4 A write access to TRNG_PKBCR has been attempted during a private key bus transfer (Error).
WPVSRC23:8Write Protection Violation Source (cleared on read)
SWE3Software Control Error (cleared on read)
SEQE2Internal Sequencer Error (cleared on read)
CGD1Clock Glitch Detected (cleared on read)
WPVS0Write Protection Violation Status (cleared on read)
ECLASS31Software Error Class (cleared on read)
  • 0 An abnormal access that does not affect system functionality.
  • 1 Reading TRNG_ODATA when TRNG was disabled or TRNG used for private key bus transfer. TRNG does not provide a random value. Writing to TRNG_PKBCR while a private key bus transfer is ongoing does not launch a new private key bus transfer.