
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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Содержание MPC5644A
Страница 2: ...MPC5644A Microcontroller Reference Manual Rev 6 2 Freescale Semiconductor...
Страница 24: ...MPC5644A Microcontroller Reference Manual Rev 6 24 Freescale Semiconductor...
Страница 26: ...MPC5644A Microcontroller Reference Manual Rev 6 26 Freescale Semiconductor...
Страница 52: ...Introduction MPC5644A Microcontroller Reference Manual Rev 6 52 Freescale Semiconductor...
Страница 56: ...Memory Map MPC5644A Microcontroller Reference Manual Rev 6 56 Freescale Semiconductor...
Страница 130: ...Device Performance Optimization MPC5644A Microcontroller Reference Manual Rev 6 130 Freescale Semiconductor...
Страница 204: ...Multi Layer AHB Crossbar Switch XBAR MPC5644A Microcontroller Reference Manual Rev 6 204 Freescale Semiconductor...
Страница 212: ...Peripheral Bridge PBRIDGE MPC5644A Microcontroller Reference Manual Rev 6 212 Freescale Semiconductor...
Страница 558: ...System Integration Unit SIU MPC5644A Microcontroller Reference Manual Rev 6 558 Freescale Semiconductor...
Страница 582: ...Frequency modulated phase locked loop FMPLL MPC5644A Microcontroller Reference Manual Rev 6 582 Freescale Semiconductor...
Страница 766: ...Enhanced Time Processing Unit eTPU2 MPC5644A Microcontroller Reference Manual Rev 6 766 Freescale Semiconductor...
Страница 1228: ...Decimation Filter MPC5644A Microcontroller Reference Manual Rev 6 1228 Freescale Semiconductor...
Страница 1236: ...System Information Module and Trim SIM MPC5644A Microcontroller Reference Manual Rev 6 1236 Freescale Semiconductor...
Страница 1250: ...Cyclic Redundancy Checker CRC Unit MPC5644A Microcontroller Reference Manual Rev 6 1250 Freescale Semiconductor...
Страница 1336: ...Deserial Serial Peripheral Interface DSPI MPC5644A Microcontroller Reference Manual Rev 6 1336 Freescale Semiconductor...
Страница 1388: ...Enhanced Serial Communication Interface ESCI MPC5644A Microcontroller Reference Manual Rev 6 1388 Freescale Semiconductor...
Страница 1440: ...FlexCAN Module MPC5644A Microcontroller Reference Manual Rev 6 1440 Freescale Semiconductor...
Страница 1624: ...FlexRay Communication Controller FlexRay MPC5644A Microcontroller Reference Manual Rev 6 1624 Freescale Semiconductor...
Страница 1670: ...JTAG Controller JTAGC MPC5644A Microcontroller Reference Manual Rev 6 1670 Freescale Semiconductor...
Страница 1692: ...Nexus Port Controller NPC MPC5644A Microcontroller Reference Manual Rev 6 1692 Freescale Semiconductor...
Страница 1701: ...Development Trigger Semaphore DTS MPC5644A Microcontroller Reference Manual Rev 6 Freescale Semiconductor 1701...
Страница 1702: ...Development Trigger Semaphore DTS MPC5644A Microcontroller Reference Manual Rev 6 1702 Freescale Semiconductor...