English
Language : 

MC9S08AC60_11 Datasheet, PDF (134/350 Pages) Freescale Semiconductor, Inc – Microcontrollers
Cyclic Redundancy Check (S08CRCV1)
8.4.1 ITU-T (CCITT) recommendations & expected CRC results
The CRC polynomial 0x1021 (x16 + x12 + x5 + 1) is popularly known as CRC-CCITT since it was initially
proposed by the ITU-T (formerly CCITT) committee.
Although the ITU-T recommendations are very clear about the polynomial to be used, 0x1021, they accept
variations in the way they are implemented:
- ITU-T V.41 implements the same circuit shown in Figure 8-2, but it recommends a SEED = 0x0000.
- ITU-T T.30 and ITU-T X.25 implement the same circuit shown in Figure 8-2, but they recommend the
final CRC result to be negated (one-complement operation). Also, they recommend a SEED = 0xFFFF.
Moreover, it is common to find circuits in literature slightly different from the one suggested by the
recommendations above, but also known as CRC-CCITT circuits (many variations require the message to
be augmented with zeros).
The circuit implemented in CRC module is exactly the one suggested by the ITU-T V.41 recommendation,
with an added flexibility of a programmable SEED. As in ITU-T V.41, no augmentation is needed and the
CRC result is not negated. Below are some expected results that can be used as a reference:
Table 8-4. Expected CRC results
Message
SEED
(initial CRC value)
CRC result
A
A
123456789
123456789
A string of 256 upper case “A”
characters with no line breaks
A string of 256 upper case “A”
characters with no line breaks
0x0000
0xffff
0x0000
0xffff
0x0000
0xffff
0x58e5
0xb915
0x31c3
0x29b1
0xabe3
0xea0b
8.5 Initialization Information
To initialize the CRC Module and initiate a CRC16-CCITT calculation, follow this procedure:
1. Write high byte of initial seed value to CRCH.
2. Write low byte of initial seed value to CRCL.
3. Write first byte of data on which CRC is to be calculated to CRCL.
4. In the next bus cycle after step 3, if desired, the CRC result from the first byte can be read from
CRCH:CRCL.
MC9S08AC60 Series Data Sheet, Rev. 3
134
Freescale Semiconductor