
Cyclic Redundancy Checker (CRC) Unit
MPC5644A Microcontroller Reference Manual, Rev. 6
1240
Freescale Semiconductor
CRC-CCITT (x25 protocol)
Eqn. 29-1
CRC-32 (ethernet protocol)
Eqn. 29-2
The polynomial to be used is based on system requirements.
In case of usage of the CRC signature for encapsulation in the data frame of a communication protocol
(e.g., SPI) a bit swap (MSB
LSB, LSB
MSB) and/or bit inversion of the final CRC signature can be
applied (CRC_OUTP register).
29.3.2
Initializing the context seed value
A CRC checksum can be thought of as the remainder of a division of a long, arbitrary number (the data
stream) by a known fixed value. The known fixed value is known as the seed value. The same seed value
must be used to generate the checksums that are to be compared to each other.
The seed value is specified in the CRC current status register (CRC_CSTAT), which as a dual purpose.
Before CRC checksum calculation is performed, i.e., during the configuration phase, the CRC_CSTAT
register is used to program the seed value. During CRC checksum calculation, the register contains the
current checksum value.
The seed value can be any arbitrary 32-bit value.
NOTE
As with the CRC configuration register (CRC_CFG) the CRC_CSTAT
register can only be written during the configuration phase. A write
protection error generated by a write operation to this register indicates it is
currently in use.
29.3.3
Writing the data stream to the context input
After the context is configured and a seed is written, the data stream is written to the context’s input register
(CRC_INP). The CRC_INP register can be written at byte, half-word (high and low) or word in any
sequence. In case of half-word write operation, the bytes must be contiguous.
NOTE
The CRC_INP register only supports aligned writes. Half-word (16-bit)
writes must be either to bits 0–15 or 16–31. Byte writes must be to bits 0–7,
bits 8–15, bits 16–23, or bits 24–31.
X
16
X
12
X
5
1
+
+
+
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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Summary of Contents for MPC5644A
Page 2: ...MPC5644A Microcontroller Reference Manual Rev 6 2 Freescale Semiconductor...
Page 24: ...MPC5644A Microcontroller Reference Manual Rev 6 24 Freescale Semiconductor...
Page 26: ...MPC5644A Microcontroller Reference Manual Rev 6 26 Freescale Semiconductor...
Page 52: ...Introduction MPC5644A Microcontroller Reference Manual Rev 6 52 Freescale Semiconductor...
Page 56: ...Memory Map MPC5644A Microcontroller Reference Manual Rev 6 56 Freescale Semiconductor...
Page 1228: ...Decimation Filter MPC5644A Microcontroller Reference Manual Rev 6 1228 Freescale Semiconductor...
Page 1440: ...FlexCAN Module MPC5644A Microcontroller Reference Manual Rev 6 1440 Freescale Semiconductor...