The Cyclic Redundancy Check, or CRC,
is a method of detecting errors in transmitted data. The CRC checksum is used when
the RX_CRCENB bit in the RCFG register is enabled. CRC4, CRC6, and CRC8 are used for
the receiver to check against the received data. The corresponding CRC check outputs
a 4-bit, 6-bit, or 8-bit CRC respectively.
- CRC4
- The CRC4 value is used to
verify the validity of data nibbles in the Fast Channel frame, the
message ID, and the 8-bit data in the Slow Channel Short Serial Message.
CRC4 uses polynomial G(x) = x^4 + x^3 + x^2 + 1 with a seed value of
0101. The status and communication nibbles are included in this CRC
calculation if the RX_CRC_WITH_STATUS parameter or programmable bit is
enabled. The checksum is implemented as a bit-wise XOR with a 16-element
array lookup. The checksum is determined by using all data nibbles in
sequence and check-summing the result with an extra zero value. A 4-bit
zero nibble is added after the data nibbles to protect for common errors
in the last data nibble and checksum.
- CRC6
- The CRC6 value is used to
verify the validity of the 24-bit Slow Channel Enhanced Serial Message
using the polynomial G(x) = x^6 + x^4 + x^3 + 1 with a seed value of
010101. CRC6 is also used to verify the 24-bit Fast Channel Frame format
data using a different polynomial, G(x) = x^6 + x + 1 with a seed value
of 010101. The checksum is implemented using a bit-wise XOR with a
64-array lookup. The checksum is determined by reading in 6-bit groups
of the 24-bit message data in order and check-summing the result with an
extra zero value, as mentioned in Section 42.3.5.
The 6-bit zero nibble is added after the data nibbles to protect for
common errors in the last data nibble and checksum.
- CRC8
- The CRC8 value is used to
verify the validity of the 28-bit Fast Channel Frame format data, which
contains 7 data nibbles and 2x2 Rolling counter data. This checksum uses
the polynomial G(x) = x^8 + x^5 + x^3 + x^2 + x + 1 with a seed value of
01010101.