![Freescale Semiconductor HCS08 Series Reference Manual Download Page 281](http://html1.mh-extra.com/html/freescale-semiconductor/hcs08-series/hcs08-series_reference-manual_2330628281.webp)
Cyclic Redundancy Check Generator (S08CRCV2)
MC9S08JS16 MCU Series Reference Manual, Rev. 4
Freescale Semiconductor
281
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 the 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.
shows some expected results that can be used as
a reference. Notice that these are ASCII string messages. For example, message “123456789” is encoded
with bytes 0x31 to 0x39 (see ASCII table).
Table 16-4. Expected CRC Results
16.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 (an alternative option is offered
for CF1Cores. See
Section 16.5, “Initialization Information”
).
4. In the next bus cycle after step 3, if desired, the CRC result from the first byte can be read from
CRCH:CRCL.
5. Repeat steps 3-4 until the end of all data to be checked.
ASCII String Message
SEED
(initial CRC value)
CRC result
“A” 0x0000
0x58e5
“A” 0xffff
0xb915
“A” 0x1d0f
1
1
One common variation of CRC-CCITT require the message to be augmented with zeros and
a SEED=0xFFFF. The CRC module will give the same results of this alternative
implementation when SEED=0x1D0F and no message augmentation.
0x9479
“123456789” 0x0000
0x31c3
“123456789” 0xffff
0x29b1
“123456789” 0x1d0f
0xe5cc
A string of 256 upper case “A”
characters with no line breaks
0x0000
0xabe3
A string of 256 upper case “A”
characters with no line breaks
0xffff
0xea0b
A string of 256 upper case “A”
characters with no line breaks
0x1d0f
0xe938
Summary of Contents for HCS08 Series
Page 2: ......
Page 4: ......
Page 8: ......
Page 62: ...Chapter 4 Memory MC9S08JS16 MCU Series Reference Manual Rev 4 62 Freescale Semiconductor...
Page 305: ......