- Asked 3/20
- 2073 Shrawan · 4 marks
- 2073 Chaitra · 3 marks
- 2072 Chaitra · 3 marks
Types of USB packets
Short answer
USB packets start with SYNC, PID and end with EOP. Four groups: token (OUT, IN, SETUP, SOF), data (DATA0/DATA1 with payload and CRC16), handshake (ACK, NAK, STALL, NYET) and special (PRE, ERR, SPLIT, PING). They control transactions between host and device.
The fundamental elements of communication on the USB data bus is a packet. Discuss various types of packets used in USB protocol.
Data on the USB bus is sent as packets. Every packet begins with a SYNC field (8 bits, to synchronise the receiver clock), then a PID (Packet Identifier, 4 bits + its 4-bit complement) and ends with an EOP (end of packet). The PID defines the packet type. There are four groups.
1. Token packets
Sent by the host to start a transaction. Format: SYNC, PID, address (7 bits), endpoint (4 bits), CRC5, EOP.
| Token | Meaning |
|---|---|
| OUT | Host will send data to the device |
| IN | Host requests data from the device |
| SETUP | Starts a control transfer (command to the device) |
| SOF | Start of Frame, sent every 1 ms (125 us in high speed) with an 11-bit frame number |
2. Data packets
Carry the payload: SYNC, PID, data (0-1023 bytes; 8/64/512/1024 bytes by speed and transfer type), CRC16, EOP.
- DATA0 and DATA1 alternate for data toggle synchronisation (error recovery); DATA2, MDATA are used in high speed.
3. Handshake packets
Only a PID; report the status of a transaction.
- ACK: data received correctly.
- NAK: device cannot accept or has no data now; try later.
- STALL: endpoint halted or request not supported.
- NYET: data accepted but not ready for the next (high speed).
4. Special packets
- PRE: preamble that enables low-speed traffic through a hub.
- ERR: error indication from a hub (split transaction).
- SPLIT: split transaction for high-speed hub to full/low speed device.
- PING: asks whether a high-speed endpoint can accept data.
IN transaction : Host -> [IN token] Device -> [DATA0] Host -> [ACK]
OUT transaction: Host -> [OUT token][DATA1] Device -> [ACK]
✓ Answer checked by Claude Sonnet 5.5
Related questions
- USB host, hub, device and packets · Instrumentation II, chapter 3
- USB protocols and common packet fields · Instrumentation II, chapter 3 · asked 2×
- USB On-The-Go (OTG) protocol · Instrumentation II, chapter 3 · asked 3×
- USB signals and bus states · Instrumentation II, chapter 3
- Basic data transfer mechanisms in USB · Instrumentation II, chapter 3
- USB standards and data transfer mechanisms · Instrumentation II, chapter 3
- Communication protocol and OSI architecture · Telecommunications, chapter 8
- Communication protocol and its need · Telecommunications, chapter 8 · asked 3×
- Performance balance and bus design elements · Computer Organization and Architecture, chapter 1 · asked 2×
- Bus admittance matrix and its elements · Power System Analysis II, chapter 1