Home of RF and Wireless Vendors and Resources

One Stop For Your RF and Wireless Need

USB Packet Types V2.0 | USB packet types V3.2

This page describes different USB packet types and its formats. It mentions USB Packet Types as per USB V2.0 and USB packet types as per USB V3.2.

The USB stands for Universal Serial Bus. It is interface similar to RS232 and RS485 but supports higher data rates at various distances. USB supports peer to peer communication. In this type of interface, communication takes place between host and peripheral and not between two hosts (or peripherals). The USB standard defines specifications for cables, connectors and protocols. It mentions requirements for connection, communication and PS (power supply) between PCs and peripheral devices.

There are various versions of USB which include v1.x, v2.x and V3.x. Each of these versions support different data rates viz. 60 Mbps, 625 Mbps and 1.25-2.5 Gbps respectively. USB 2.0 is known as high speed, USB 3.0 is known as superspeed and USB 3.2 is known as superspeedplus. USB standards support cables with length upto 5 meters. Beyond this, USB hubs are required to expand connectivity.

USB packet types as per V2.0

USB Packet Types v2

• The figure depicts USB packet types as per USB2.0 Standard.
• All the packets consists of "SYNC" at the beginning and "EOP" (End Of Packet) at the end. SYNC field is also known as preamble which is used for synchronization between device and host.
• PID (Packet ID): It is used to identify type of packet which is to be transmitted. There are 4 bits in PID field, however to insure it is received correctly, the 4 bits are complemented and repeated after initial 4 bits. Hence PID is total 8 bits in size.
PID = { PID0, PID1, PID2, PID3, PID0', nPID1', nPID2', nPID3 }
ADDR: This field specifies which device the packet is designated for. It is 7 bits in size.
ENDP (endpoint field): It is made up of 4 bits in size. It allows 16 possible endpoints.
CRC (Cyclic Redundancy Check): It is used to detect erroneous packets.It is 5 bits in size.
EOP: End of Packet.

USB PID types

Following are the USB packet types defined in USB2.0. Let us understand functions of each of these packet types.
Token Packet:There are three types of token packets viz. IN, OUT and SETUP.
In - It informs the USB device that the host wishes to read information.
Out - It informs the USB device that the host wishes to send information.
Setup - It is used to begin control transfers.
Data Packet: There are two types of data packets each capable of transmitting up to 1024 bytes of data. They are designated as Data0 and Data1.
Handshake Packet: There are three type of handshake packets which consists only PID field. They are ACK, NAK and STALL .
ACK - Acknowledgment that the packet has been successfully received.
NAK - Reports that the device temporary cannot send or received data. Also used during interrupt transactions to inform the host there is no data to send.
STALL - The device finds its in a state that it requires intervention from the host.
SOF (Start of Frame) Packet: The SOF packet consisting of an 11 bit frame number. It is transmitted by the host every 1ms +/- 500ns on a full speed bus or every 125 µs +/- 0.0625 Ás on a high speed bus.

USB packet types as per V3.2

USB Packet Types v3

The figure depicts USB packet types as per USB3.2 Standard. As it consists of following packets viz. LMP (Link Management Packet), TP (Transaction packet), DP (Data packet) and ITS (Isochronous Timestamp) packet.

There is "TYPE" field (of size: 5 bits) in all the packet types which determines how to interpret the packet. Following table mentions the same. CRC-16 or CRC-32 are used at the end of these packet types for error detection of the packets.

Value of Type Field Packet Type
00000 Link Management Packet
00100 Transaction Packet
01000 Data Packet Header
01100 Isochronous Timestamp Packet

LMP Packet Format

USB LMP Packet Format

The figure mentions structure of LMP packet type. Here "TYPE" field is set to "00000b". Subtype field (size: 4 bits) indicate following.

Value of subtype field Packet Type
0000b Reserved
0001b Set Link Function
0010b U2 Inactivity Timeout
0011b Vendor Device Test
0100b Port Capability
0101b Port Configuration
0110b Port Configuration Response
0111b Precision Time Management
1000b-1111b Reserved

TP Packet Format

The figure mentions structure of TP packet type. Here "TYPE" field is set to "00100b".

DP Packet Format

USB DP Packet Format

The figure mentions structure of DP packet type. Here "TYPE" field is set to "01000b".

ITS Packet Format

USB ITS Packet Format

The figure mentions structure of ITS packet type. Here "TYPE" field is set to "01100b".

Useful interface types and microcontroller stuff

USB Type-C interface   RS485 interface   RS422 interface   CAN interface   SPI interface   interface types and converters   DigRF interface  what is microcontroller  microcontroller vs microprocessor  microcontroller programming 

RF and Wireless Terminologies

Share this page

Translate this page