Crc Calculations - NXP Semiconductors MC9S08SU16 Reference Manual

Table of Contents

Advertisement

Functional description

16.4.2 CRC calculations

16.4.2.1 16-bit CRC
To compute a 16-bit CRC:
1. Clear CRC_CTRL[TCRC] to enable 16-bit CRC mode.
2. Program the transpose and complement options in the CTRL register as required for
the CRC calculation. See
3. Write a 16-bit polynomial to the CRC_PL1 and CRC_PL0. The CRC_PH1 and
CRC_PH2 are not usable in 16-bit CRC mode.
4. Set CRC_CTRL[WAS] to program the seed value.
5. Write a 16-bit seed to CRC_DL1 and CRC_DL0. CRC_DH1 and CRC_DH0 are not
used.
6. Clear CRC_CTRL[WAS] to start writing data values.
7. Write data values into CRC_DL0. A CRC is computed on every data value write, and
the intermediate CRC result is stored back into CRC_DL1 and CRC_DL0.
8. When all values have been written, read the final CRC result from CRC_DL1 and
CRC_DL0.
Transpose and complement operations are performed on the fly while reading or writing
values. See
Transpose feature
16.4.2.2 32-bit CRC
To compute a 32-bit CRC:
1. Set CRC_CTRL[TCRC] to enable 32-bit CRC mode.
2. Program the transpose and complement options in the CTRL register as required for
the CRC calculation. See
3. Write a 32-bit polynomial to CRC_PH1, CRC_PH0, CRC_PL1 and CRC_PL0.
4. Set CRC_CTRL[WAS] to program the seed value.
5. Write a 32-bit seed to CRC_DH1, CRC_DH0, CRC_DL1 and CRC_DL0.
6. Clear CRC_CTRL[WAS] to start writing data values.
7. Write data values into CRC_DL0. A CRC is computed on every data value write, and
the intermediate CRC result is stored back into CRC_DH1, CRC_DH0, CRC_DL1
and CRC_DL0.
252
Transpose feature
and
CRC result complement
Transpose feature
MC9S08SU16 Reference Manual, Rev. 5, 4/2017
and
CRC result complement
for details.
and
CRC result complement
for details.
for details.
NXP Semiconductors

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mc9s08su16vfkMc9s08su8vfk

Table of Contents