AT32F421
Series Reference Manual
2022.11.11
Page 107
Rev 2.02
10
CRC calculation unit (CRC)
10.1 CRC introduction
The Cyclic Redundancy Check (CRC) is an independent peripheral with CRC check feature. It follows
CRC32 standard.
The CRC_CTRL register is used to select input data toggle (word, REVOD=1) or output data toggle
(byte, REVID=01; half-word, REVID=10; word: REVID=11). CRC calculation unit is also equipped with
initialization function. After each reset, the value in the CRC_IDT register is written into the data register
(CRC_DT) by CRC.
Users can write the data to go through CRC check and read the calculated result through CRC_DT
register. Note that the calculation result is the combination of the previous result and the current value
to be calculated.
Main features
Use CRC-32 code
4 HCLK cycles for each CRC calculation
Support input/output data format toggle
Perform write/read operation through CRC_DT register
Set an initialization value with the CRC_IDT register. The value is loaded into CRC_DT register
after each CRC reset.
10.2 CRC registers
CRC_DT register can be accessed by bytes (8 bits), half-words (16 bits) or words (32 bits). Other
registers have to be accessed by words (32 bits).
Table 10-1 CRC register map and reset value
Register
Offset
Reset value
CRC_DT
0x00
0xFFFF FFFF
CRC_CDT
0x04
0x0000 0000
CRC_CTRL
0x08
0x0000 0000
CRC_IDT
0x10
0xFFFF FFFF
10.2.1 Data register (CRC_DT)
Bit
Register
Reset value
Type
Description
Bit 31: 0
DT
0xFFFF FFFF rw
Data value
This field stands for data register bits.
Used as input register when writing new data into the CRC
calculator. It returns CRC calculation results when it is
read.
10.2.2 Common data register (CRC_CDT)
Bit
Register
Reset value
Type
Description
Bit 31: 8
Reserved
0x000000
resd
Kept at its default value.
Bit 7: 0
CDT
0x00
rw
Common 8-bit data value
This field is used to store 1-byte data temporarily. This
register is not affected by the CRC reset generated by the
RST bit in the CRC_CTRL register.