Crc protocol specifications, Crc calculation, Example – Nortel Networks 1000M User Manual
Page 468
468
Appendix A Communication protocol specifications
This protocol does not restrict the contents of data sent. Control characters
are not processed in the 128-byte data messages (they are handled the
same as other characters).
CRC protocol specifications
The Cyclic Redundancy Check (CRC) protocol is a form of block check
which provides more robust error detection than the original checksum. The
CRC-CCITT used by the modem protocol detects all single- and double-bit
errors, all errors with an odd number of bits, all burst errors of length 16 or
less, 99.97% of 17-bit error bursts, and 99.98% of 18-bit and longer bursts.
Each block of the transfer in CRC mode looks like:
in which:
to 00H (not 01)
<255-blk #>= ones complement of blk #
CRC Calculation
To calculate the 16-bit CRC, the message bits are considered to be the
coefficients of a polynomial. This message polynomial is first multiplied by
X
16
and then divided by the generator polynomial (X
16
+ X
12
+ X
5
+ 1) using
modulo 2 arithmetic. The remainder left after the division is the desired
CRC. Since a message block in the Modem Protocol is 128 bytes or 1024
bits, the message polynomial will be to the order of X
1023
. The hi order bit of
the first byte of the message block is the coefficient of X
1023
in the message
polynomial. The lo order bit of the last byte of the message is the coefficient
of X
0
in the message polynomial.
Example:
/* update CRC */
unsigned short
updcrc(c, crc)
register c;
register unsigned crc;
{
register count;
for (count=8; --count>=0;) {
if (crc & 0x8000) {
crc <<= 1;
Nortel Communication Server 1000
Communication Server 1000M and Meridian 1 Small System Installation and Commissioning
NN43011-310
01.04
Standard
Release 5.0
13 May 2008
Copyright © 2008, Nortel Networks
.