RM0090 CRC calculation unit
Doc ID 018909 Rev 4 86/1422
4 CRC calculation unit
This section applies to the whole STM32F4xx family, unless otherwise specified.
4.1 CRC introduction
The CRC (cyclic redundancy check) calculation unit is used to get a CRC code from a 32-bit
data word and a fixed generator polynomial.
Among other applications, CRC-based techniques are used to verify data transmission or
storage integrity. In the scope of the EN/IEC 60335-1 standard, they offer a means of
verifying the Flash memory integrity. The CRC calculation unit helps compute a signature of
the software during runtime, to be compared with a reference signature generated at link-
time and stored at a given memory location.
4.2 CRC main features
● Uses CRC-32 (Ethernet) polynomial: 0x4C11DB7
–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
● Single input/output 32-bit data register
● CRC computation done in 4 AHB clock cycles (HCLK)
● General-purpose 8-bit register (can be used for temporary storage)
The block diagram is shown in Figure 6.
Figure 6. CRC calculation unit block diagram
4.3 CRC functional description
The CRC calculation unit mainly consists of a single 32-bit data register, which:
● is used as an input register to enter new data in the CRC calculator (when writing into
the register)
● holds the result of the previous CRC calculation (when reading the register)
AHB bus
32-bit (read access)
Data register (output)
CRC computation (polynomial: 0x4C11DB7)
32-bit (write access)
Data register (input)
ai14968