Skip to main content

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)

  1. Control transfer: configuration and commands (enumeration, SET_ADDRESS). Setup stage, optional data stage, status stage; error-checked.
  2. Bulk transfer: large, non-time-critical data (printer, storage); error-checked with retry, uses spare bandwidth.
  3. Interrupt transfer: small data with guaranteed polling interval (keyboard, mouse); host polls the device.
  4. Isochronous transfer: real-time streaming (audio, video) with guaranteed bandwidth but no retry and no handshake.

Packet types

GroupPacketsPurpose
TokenOUT, IN, SETUP, SOFStart a transaction, give address and endpoint
DataDATA0, DATA1 (DATA2, MDATA)Carry the payload
HandshakeACK, NAK, STALL, NYETReport status
SpecialPRE, ERR, SPLIT, PINGHub 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

All Instrumentation II chapter 3 questions →