PIC32CX2051MTG64 SHA registers

The 49 registers of SHA (Secure Hash Algorithm), from 0x44008000, with their reset value and every field. The PIC32CX2051MTG64 has 2801 registers in 57 peripherals, one page each.

SHA Secure Hash Algorithm

SHA_CRControl Register

Address
0x44008000
Reset
0x00000000
Access
write only
Size
32-bit
6 fields
FieldBitsWhat it does
UNLOCK24Unlock Processing
WUIEHV13Write User Initial or Expected Hash Values
WUIHV12Write User Initial Hash Values
SWRST8Software Reset
FIRST4First Block of a Message
START0Start Processing

SHA_MRMode Register

Address
0x44008004
Reset
0x00000000
Access
read/write
Size
32-bit
11 fields
FieldBitsWhat it does
CHECK25:24Hash Check
  • 0 No check is performed
  • 1 Check is performed with expected hash stored in internal expected hash value registers.
  • 2 Check is performed with expected hash provided after the message.
DUALBUFF16Dual Input Buffer
  • 0 SHA_IDATARx and SHA_IODATARx cannot be written during processing of previous block.
  • 1 SHA_IDATARx and SHA_IODATARx can be written during processing of previous block when SMOD value = 2. It speeds up the overall runtime of large files.
TMPLCK15Tamper Lock Enable
ALGO11:8SHA Algorithm
  • 0 SHA1 algorithm processed
  • 1 SHA256 algorithm processed
  • 2 SHA384 algorithm processed
  • 3 SHA512 algorithm processed
  • 4 SHA224 algorithm processed
  • 5 SHA512/224 algorithm processed
  • 6 SHA512/256 algorithm processed
  • 8 HMAC algorithm with SHA1 Hash processed
  • 9 HMAC algorithm with SHA256 Hash processed
  • 10 HMAC algorithm with SHA384 Hash processed
  • 11 HMAC algorithm with SHA512 Hash processed
  • 12 HMAC algorithm with SHA224 Hash processed
  • 13 HMAC algorithm with SHA512/224 Hash processed
  • 14 HMAC algorithm with SHA512/256 Hash processed
BPE7Block Processing End
UIEHV6User Initial or Expected Hash Value Registers
UIHV5User Initial Hash Value Registers
PROCDLY4Processing Delay
  • 0 SHA processing runtime is the shortest one
  • 1 SHA processing runtime is the longest one (reduces the SHA bandwidth requirement, reduces the system bus overload)
AOE3Always ON Enable
SMOD1:0Start Mode
  • 0 Manual mode
  • 1 Auto mode
  • 2 SHA_IDATAR0 access only mode (mandatory when DMA is used)
CHKCNT31:28Check Counter

SHA_IERInterrupt Enable Register

Address
0x44008010
Reset
0x00000000
Access
write only
Size
32-bit
6 fields
FieldBitsWhat it does
SECE24Security and/or Safety Event Interrupt Enable
CHECKF16Check Done Interrupt Enable
URAD8Unspecified Register Access Detection Interrupt Enable
TXBUFE2Transmit Buffer Empty Interrupt Enable
ENDTX1End of Transmit Buffer Interrupt Enable
DATRDY0Data Ready Interrupt Enable

SHA_IDRInterrupt Disable Register

Address
0x44008014
Reset
0x00000000
Access
write only
Size
32-bit
6 fields
FieldBitsWhat it does
SECE24Security and/or Safety Event Interrupt Disable
CHECKF16Check Done Interrupt Disable
URAD8Unspecified Register Access Detection Interrupt Disable
TXBUFE2Transmit Buffer Empty Interrupt Disable
ENDTX1End of Transmit Buffer Interrupt Disable
DATRDY0Data Ready Interrupt Disable

SHA_IMRInterrupt Mask Register

Address
0x44008018
Reset
0x00000000
Access
read only
Size
32-bit
6 fields
FieldBitsWhat it does
SECE24Security and/or Safety Event Interrupt Mask
CHECKF16Check Done Interrupt Mask
URAD8Unspecified Register Access Detection Interrupt Mask
TXBUFE2Transmit Buffer Empty Interrupt Mask
ENDTX1End of Transmit Buffer Interrupt Mask
DATRDY0Data Ready Interrupt Mask

SHA_ISRInterrupt Status Register

Address
0x4400801C
Reset
0x00000000
Access
read only
Size
32-bit
9 fields
FieldBitsWhat it does
SECE24Security and/or Safety Event
CHKST23:20Check Status (cleared by writing START or SWRST bits in SHA_CR or by reading SHA_IODATARx)
CHECKF16Check Done Status (cleared by writing START or SWRST bits in SHA_CR or by reading SHA_IODATARx)
URAT14:12Unspecified Register Access Type (cleared by writing a 1 to SWRST bit in SHA_CR)
URAD8Unspecified Register Access Detection Status (cleared by writing a 1 to SWRST bit in SHA_CR)
WRDY4Input Data Register Write Ready
TXBUFE2TX Buffer Empty (cleared by writing SHA_TCR or SHA_TNCR)
ENDTX1End of TX Buffer (cleared by writing SHA_TCR or SHA_TNCR)
DATRDY0Data Ready (cleared by writing a 1 to bit SWRST or START in SHA_CR, or by reading SHA_IODATARx)

SHA_MSRMessage Size Register

Address
0x44008020
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
MSGSIZE31:0Message Size

SHA_BCRBytes Count Register

Address
0x44008030
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
BYTCNT31:0Remaining Byte Count Before Auto Padding

SHA_IDATAR0Input Data 0 Register

Address
0x44008040
Reset
0x00000000
Access
write only
Size
32-bit
1 field
FieldBitsWhat it does
IDATA31:0Input Data

SHA_IDATAR1Input Data 0 Register

Address
0x44008044
Reset
0x00000000
Access
write only
Size
32-bit
1 field
FieldBitsWhat it does
IDATA31:0Input Data

SHA_IDATAR2Input Data 0 Register

Address
0x44008048
Reset
0x00000000
Access
write only
Size
32-bit
1 field
FieldBitsWhat it does
IDATA31:0Input Data

SHA_IDATAR3Input Data 0 Register

Address
0x4400804C
Reset
0x00000000
Access
write only
Size
32-bit
1 field
FieldBitsWhat it does
IDATA31:0Input Data

SHA_IDATAR4Input Data 0 Register

Address
0x44008050
Reset
0x00000000
Access
write only
Size
32-bit
1 field
FieldBitsWhat it does
IDATA31:0Input Data

SHA_IDATAR5Input Data 0 Register

Address
0x44008054
Reset
0x00000000
Access
write only
Size
32-bit
1 field
FieldBitsWhat it does
IDATA31:0Input Data

SHA_IDATAR6Input Data 0 Register

Address
0x44008058
Reset
0x00000000
Access
write only
Size
32-bit
1 field
FieldBitsWhat it does
IDATA31:0Input Data

SHA_IDATAR7Input Data 0 Register

Address
0x4400805C
Reset
0x00000000
Access
write only
Size
32-bit
1 field
FieldBitsWhat it does
IDATA31:0Input Data

SHA_IDATAR8Input Data 0 Register

Address
0x44008060
Reset
0x00000000
Access
write only
Size
32-bit
1 field
FieldBitsWhat it does
IDATA31:0Input Data

SHA_IDATAR9Input Data 0 Register

Address
0x44008064
Reset
0x00000000
Access
write only
Size
32-bit
1 field
FieldBitsWhat it does
IDATA31:0Input Data

SHA_IDATAR10Input Data 0 Register

Address
0x44008068
Reset
0x00000000
Access
write only
Size
32-bit
1 field
FieldBitsWhat it does
IDATA31:0Input Data

SHA_IDATAR11Input Data 0 Register

Address
0x4400806C
Reset
0x00000000
Access
write only
Size
32-bit
1 field
FieldBitsWhat it does
IDATA31:0Input Data

SHA_IDATAR12Input Data 0 Register

Address
0x44008070
Reset
0x00000000
Access
write only
Size
32-bit
1 field
FieldBitsWhat it does
IDATA31:0Input Data

SHA_IDATAR13Input Data 0 Register

Address
0x44008074
Reset
0x00000000
Access
write only
Size
32-bit
1 field
FieldBitsWhat it does
IDATA31:0Input Data

SHA_IDATAR14Input Data 0 Register

Address
0x44008078
Reset
0x00000000
Access
write only
Size
32-bit
1 field
FieldBitsWhat it does
IDATA31:0Input Data

SHA_IDATAR15Input Data 0 Register

Address
0x4400807C
Reset
0x00000000
Access
write only
Size
32-bit
1 field
FieldBitsWhat it does
IDATA31:0Input Data

SHA_IODATAR0Input/Output Data 0 Register

Address
0x44008080
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
IODATA31:0Input/Output Data

SHA_IODATAR1Input/Output Data 0 Register

Address
0x44008084
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
IODATA31:0Input/Output Data

SHA_IODATAR2Input/Output Data 0 Register

Address
0x44008088
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
IODATA31:0Input/Output Data

SHA_IODATAR3Input/Output Data 0 Register

Address
0x4400808C
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
IODATA31:0Input/Output Data

SHA_IODATAR4Input/Output Data 0 Register

Address
0x44008090
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
IODATA31:0Input/Output Data

SHA_IODATAR5Input/Output Data 0 Register

Address
0x44008094
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
IODATA31:0Input/Output Data

SHA_IODATAR6Input/Output Data 0 Register

Address
0x44008098
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
IODATA31:0Input/Output Data

SHA_IODATAR7Input/Output Data 0 Register

Address
0x4400809C
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
IODATA31:0Input/Output Data

SHA_IODATAR8Input/Output Data 0 Register

Address
0x440080A0
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
IODATA31:0Input/Output Data

SHA_IODATAR9Input/Output Data 0 Register

Address
0x440080A4
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
IODATA31:0Input/Output Data

SHA_IODATAR10Input/Output Data 0 Register

Address
0x440080A8
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
IODATA31:0Input/Output Data

SHA_IODATAR11Input/Output Data 0 Register

Address
0x440080AC
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
IODATA31:0Input/Output Data

SHA_IODATAR12Input/Output Data 0 Register

Address
0x440080B0
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
IODATA31:0Input/Output Data

SHA_IODATAR13Input/Output Data 0 Register

Address
0x440080B4
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
IODATA31:0Input/Output Data

SHA_IODATAR14Input/Output Data 0 Register

Address
0x440080B8
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
IODATA31:0Input/Output Data

SHA_IODATAR15Input/Output Data 0 Register

Address
0x440080BC
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
IODATA31:0Input/Output Data

SHA_WPMRWrite Protection Mode Register

Address
0x440080E4
Reset
0x00000000
Access
read/write
Size
32-bit
6 fields
FieldBitsWhat it does
ACTION6:5Action on Abnormal Event Detection
  • 0 No action (stop or clear key) is performed when one of WPVS,CGD,SEQE, or SWE flag is set.
  • 1 If a processing is in progress when the SHA_WPSR.WPVS/SWE event detection occurs, the current processing is ended normally but no other processing is started while a SHA_CR.UNLOCK command is issued.
  • 2 If a processing is in progress when the SHA_WPSR.CGD/SEQE event detection occurs, the current processing is ended normally but no other processing is started while a SHA_CR.UNLOCK command is issued.
  • 3 If a processing is in progress when the SHA_WPSR.WPVS/CGD/SEQE/SWE events detection occurs, the current processing is ended normally but no other processing is started while a SHA_CR.UNLOCK command is issued.
FIRSTE4First Error Report Enable
WPCREN2Write Protection Control Enable
WPITEN1Write Protection Interruption Enable
WPEN0Write Protection Configuration Enable
WPKEY31:8Write Protection Key
  • 5457985 Writing any other value in this field aborts the write operation of the WPEN,WPITEN,WPCREN bits. Always reads as 0.

SHA_WPSRWrite Protection Status Register

Address
0x440080E8
Reset
0x00000000
Access
read only
Size
32-bit
7 fields
FieldBitsWhat it does
SWETYP27:24Software Error Type (cleared on read)
  • 0 A write-only register has been read (Warning).
  • 1 SHA is enabled and a write access has been performed on a read-only register (Warning).
  • 2 Access to an undefined address (Warning).
  • 3 SHA is locked and a start command with SHA_CR.START has been performed.
  • 4 SHA is locked and a tentative automatic start has been performed by writing input data registers (SHA_MR.SMOD>0).
  • 5 SHA is not locked and a start command with SHA_CR.START has been performed whereas Start mode is automatic (SHA_MR.SMOD>0)
WPVSRC15:8Write Protection Violation Source
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 An access is performed into key, input data, control registers while the SHA is performing an encryption/decryption or a start is request by software or DMA while the key is not fully configured.

SHA_TPRTransmit Pointer Register

Address
0x44008108
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
TXPTR31:0Transmit Counter Register

SHA_TCRTransmit Counter Register

Address
0x4400810C
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
TXCTR15:0Transmit Counter Register

SHA_TNPRTransmit Next Pointer Register

Address
0x44008118
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
TXNPTR31:0Transmit Next Pointer

SHA_TNCRTransmit Next Counter Register

Address
0x4400811C
Reset
0x00000000
Access
read/write
Size
32-bit
1 field
FieldBitsWhat it does
TXNCTR15:0Transmit Counter Next

SHA_PTCRTransfer Control Register

Address
0x44008120
Reset
0x00000000
Access
write only
Size
32-bit
9 fields
FieldBitsWhat it does
ERRCLR24Transfer Bus Error Clear
TXCBDIS19Transmitter Circular Buffer Disable
TXCBEN18Transmitter Circular Buffer Enable
RXCBDIS17Receiver Circular Buffer Disable
RXCBEN16Receiver Circular Buffer Enable
TXTDIS9Transmitter Transfer Disable
TXTEN8Transmitter Transfer Enable
RXTDIS1Receiver Transfer Disable
RXTEN0Receiver Transfer Enable

SHA_PTSRTransfer Status Register

Address
0x44008124
Reset
0x00000000
Access
read only
Size
32-bit
5 fields
FieldBitsWhat it does
ERR24Transfer Bus Error
TXCBEN18Transmitter Circular Buffer Enable
RXCBEN16Receiver Circular Buffer Enable
TXTEN8Transmitter Transfer Enable
RXTEN0Receiver Transfer Enable

SHA_PWPMRWrite Protection Mode Register

Address
0x44008128
Reset
0x00000000
Access
read/write
Size
32-bit
4 fields
FieldBitsWhat it does
WPCREN2Write Protection Control Register Enable
WPCTREN1Write Protection Counter Registers Enable
WPPTREN0Write Protection Pointer Registers Enable
WPKEY31:8Write Protection Key
  • 5260355 Writing any other value in this field aborts the write operation. Always reads as 0.