- Asked 2/20
- 2078 Bhadra · 6 marks
- 2076 Asoj · 1+3 marks
USB protocols and common packet fields
Short answer
USB defines four transfer protocols: control for configuration, bulk for large data, interrupt for periodic polling, and isochronous for real-time streaming. Common packet fields across token, data, and handshake packets include SYNC, PID, device/endpoint address, data, and CRC for error checking.
Describe different types of USB protocols along with the common USB packet fields.
USB is a host-controlled serial bus. All communication is by transactions, built from packets. The "protocols" of USB are the four transfer protocols (control, bulk, interrupt, isochronous) together with the token-data-handshake packet protocol.
Types of USB protocols (transfer types)
- Control transfer: configuration and commands (enumeration, SET_ADDRESS). Setup stage, optional data stage, status stage; error-checked.
- Bulk transfer: large, non-time-critical data (printer, storage); error-checked with retry, uses spare bandwidth.
- Interrupt transfer: small data with guaranteed polling interval (keyboard, mouse); host polls the device.
- Isochronous transfer: real-time streaming (audio, video) with guaranteed bandwidth but no retry and no handshake.
Packet types
| Group | Packets | Purpose |
|---|---|---|
| Token | OUT, IN, SETUP, SOF | Start a transaction, give address and endpoint |
| Data | DATA0, DATA1 (DATA2, MDATA) | Carry the payload |
| Handshake | ACK, NAK, STALL, NYET | Report status |
| Special | PRE, ERR, SPLIT, PING | Hub and high-speed control |
Common packet fields
| SYNC | PID | ADDR | ENDP | CRC5 | EOP | token packet
| SYNC | PID | DATA | CRC16 | EOP | data packet
| SYNC | PID | EOP | handshake packet
- SYNC: 8 bits (KJKJKJKK in full speed) to synchronise the receiver clock.
- PID (Packet identifier): 4-bit type plus its 4-bit complement for error checking.
- ADDR: 7-bit device address (up to 127 devices).
- ENDP: 4-bit endpoint number (up to 16).
- Frame number: 11 bits in SOF packets.
- DATA: 0 to 1023 bytes (8/64/512 by speed and type).
- CRC: CRC5 protects token fields; CRC16 protects the data field.
- EOP: end of packet, two bit times of SE0 followed by J state. Bits are sent least significant bit first, NRZI coded with bit stuffing (a 0 inserted after six consecutive 1s).
✓ Answer checked by Claude Sonnet 5.5
Related questions
- USB protocols followed in USB design · Instrumentation II, chapter 3
- Types of USB packets · Instrumentation II, chapter 3 · asked 3×
- Instruction fields and address formats for X=(E+F)*(G+H) · Computer Organization and Architecture, chapter 2