Hitachi HD64465 User Manual page 320

Windows ce intelligent peripheral controller
Table of Contents

Advertisement

1. Token - All data following the PIDs are included in the CRC generation. Equation 18-1 is
the polynomial used to generate the token packet CRC:
Equation 18.1 Token Packet CRC Generator Polynomial
After the token data is finished the source of the transmitted bit stream is switched to the
CRC (MSb first). The byte counter completes the last full byte of the token packet with the
inverted 5-bit remainder of the CRC generator.
The checker polynomial (Equation 18-2) is provided only as a reference since the root
device never receives a token packet and never checks against it.
Equation 18.2 Token Packet CRC Checker Polynomial
2. Data - For transmitting, all data following the PIDs are included in the CRC generation.
Equation 18-3 is the polynomial used to generate the data packet CRC.
Equation 18.3 Data Packet CRC Generator Polynomial
The inverted 16-bit remainder follows the data bytes of a data packet (MSb first), even for a
0 byte data packet.
For receiving, all bits after the PID until the EOP must be processed through the CRC
checker (including the CRC bytes since they cannot be identified until after EOP). The
checker is only valid for data packets, i.e. the packet PID is DATA0 or DATA1. After
processing the data and the CRC from the packet, the remainder is compared with the
checker polynomial (see below). If equal the data was correctly received. Otherwise, a CRC
error is present and the packet is discarded.
Until the EOP is detected it is impossible to separate the functional data bytes from the two
CRC bytes. This means that all bits until the EOP must be processed through the checker.
The minimum number of bytes through the checker is two bytes (16 bit CRC code for a 0
data byte packet). After the second full byte and for each following full byte, the CRC
remainder is checked against the checker polynomial. If equal and the EOP is received
before the next full byte of bus data, the packet is successfully received. If the EOP is
detected and the last CRC check failed, the packet is unsuccessful and the EOP is treated as
a false EOP. At the EOP the last two bytes are identified as the CRC code and must be
invalidated in the data buffer. Equation 18-4 shows the data packet checker polynomial.
Equation 18.4 Data Packet CRC Checker Polynomial
G(X) = X 5 + X 2 + 1 = 10101b
G(X) = X 3 + X 2 = 01100b
G(X) = X 16 + X 15 + X 2 + 1 = 10005h
G(X) = X 15 + X 3 + X 2 + 1 = 800Dh
Rev. 3.0, 03/01, page 301 of 390

Advertisement

Table of Contents
loading

Table of Contents