Part IPart IIPart III1-7 USB PACKET TYPES
USB has four different packet types.
The first byte in every packet is the Packet Identifier (PID) byte. This byte needs to be recognized quickly by the USB controller. This is why it is not included in any CRC checks. It has its own validity check.
There are 4 bits to the PID. The check method uses the PID 4 bits by repeating and complementing them, making an 8 bit PID field in total.
1-7-1 TOKEN PACKETS
Token packets signal the type of transaction to follow. They are always the first packet in a transaction, identifying the targeted endpoint, and the purpose of the transaction. There are four types of token packets:
1-7-2 DATA PACKETS — LOW AND FULL SPEED
Data packets contain the payload. There are two types of data packets used in low speed and full speed connections: DATA0 and DATA1, each capable of transmitting up to 1024 bytes of data.
DATA0 and DATA1 PIDs are used together as part of an error-checking system. All data packets on a particular endpoint use an alternating pattern of DATA0 / DATA1 so that the endpoint knows if a received packet is the one it is expecting. If it is not the expected packet, it will still acknowledge (ACK) the packet as it is correctly received, but will then discard the data, assuming that it has been retransmitted because the host missed seeing the ACK after the previous data packet.
1-7-3 DATA PACKETS — HIGH SPEED
High Speed mode defines two additional data PIDs: DATA2 and MDATA.
1-7-4 HANDSHAKE PACKETS
Handshake packets are used for acknowledging data or reporting errors. There are four type of handshake packets which consist simply of the PID.
1-7-5 SPLIT TRANSACTION SPECIAL TOKEN PACKETS
The split transaction token is used to support split transactions between the host controller communicating with a hub operating at high speed with full-/low-speed devices to some of its downstream facing ports. The SPLIT packet is the first packet in either a Start Split transaction or a Complete Split transaction, sent to a high-speed hub when it is handling a low or full speed device.