
Rev. 1.00
526 of 576
January 28, 2022
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F54231/HT32F54241/HT32F54243/HT32F54253
26 Cyclic Redundancy Check (CRC)
26
26
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
AH
B
Bu
s
CRC Data
Register
CRC Sum
Register
BYTE
REVERSE
Figure 187. 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 and bit reverse operation on data and checksum
▆
Supports byte, half-word and word data size
▆
Programmable CRC initial seed value
▆
CRC computation executed in 1 AHB clock cycle for 8-bit data and 4 AHB clock cycles for 32-
bit data
▆
Supports PDMA to complete a CRC computation of a block of memory, this function is only
available for the HT32F54243/HT32F54253 devices