
Rev. 1.00
480 of 486
July 31, 2018
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F50231/HT32F50241
23 Divider (DIV)
24 Cyclic Redundancy Check (CRC)
24
Cyclic Redundancy Check (CRC)
Introduction
The CRC (Cyclic Redundancy Check) calculation unit is an error detection technique test algorithm
and is used to verify data transmission or storage data correctness. A CRC calculation takes a data
stream or a block of data as input and generates a 16-bit or 32-bit output remainder. Ordinarily,
a data stream is suffixed by a CRC code and used as a checksum when being sent or stored.
Therefore, the received or restored data stream is calculated by the same generator polynomial as
described above. If the new CRC code result does not match the one calculated earlier, that means
data stream contains a data error.
CRC Control
Register
CRC Seed
Register
B3
B2
B1
B0
MUX
1's COMP
BIT
REVERSE
CCITT-16
POLY
CRC-16
POLY
CRC-32
POLY
MUX
MUX
CRC
REG
1's COMP
BIT
REVERSE
BYTE
REVERSE
CRC FSM
AHB B
us
CRC Data
Register
CRC Sum
Register
BYTE
REVERSE
Figure 177. CRC Block Diagram
Features
▄
Supports CRC16 polynomial: 0x8005, X
16
+ X
15
+ X
2
+ 1
▄
Supports CCITT CRC16 polynomial: 0x1021, X
16
+ X
12
+ X
5
+ 1
▄
Supports IEEE-802.3 CRC32 polynomial: 0x04C11DB7,
X
32
+ X
26
+ X
23
+ X
22
+ X
16
+ X
12
+ X
11
+ X
10
+ X
8
+ X
7
+ X
5
+ X
4
+ X
2
+ X + 1
▄
Supports 1’s complement, byte reverse & bit reverse operation on data and checksum
▄
Supports byte, half-word & word data size
▄
Programmable CRC initial seed value
▄
CRC computation done in 1 AHB clock cycle for 8-bit data and 4 AHB clock cycles for 32-bit data