Host controller initiates everything. Devices attach to ports (root or hub). Enumeration: host assigns address, reads descriptors (device, configuration, interface, endpoint), selects configuration.
Endpoints are the data pipes: bulk (reliable, best-effort bandwidth), interrupt (periodic, small), isochronous (time-bound, no retry). Each endpoint has max packet size and polling interval.
USB DATA FLOW
Host Controller --> Hub --> Device
| |
schedule endpoints
transfers EP0: control
EP1: bulk IN
EP2: interruptFor USB 2.0 control, bulk and interrupt transfers, transactions use token, optional data and applicable handshake packets. Isochronous transfers do not use a transaction-level retry handshake. NAK can report temporary inability on applicable transfers; STALL reports a halted or unsupported endpoint condition whose recovery depends on the transfer and host-stack contract.
USB 3.x has revision-specific link training, link states and packet mechanisms rather than reusing the USB 2.0 transaction model. Treat PCIe LTSSM only as a layering analogy, not as the USB state machine, and name the USB revision when discussing recovery or streams.
For USB 2.0 timing, full-speed SOF packets mark 1 ms frames; high-speed SOF packets mark 125 µs microframes, eight per millisecond. At high speed, a 1 ms interval therefore spans eight microframes, not one. This is the scheduling timebase, not a promise that every endpoint transfers in every microframe: service depends on transfer type, endpoint configuration and the host schedule.
SOF (Start of Frame): 1 ms at full speed, 125 µs per microframe at high speed; keep speed and endpoint service interval distinct.
Packet-size limits depend on both speed and transfer type; do not apply a bulk-endpoint table to interrupt or isochronous endpoints.
ZLP (zero-length packet) marks end of some transfers.
SOF (Start of Frame): 1 ms at full speed, 125 µs per microframe at high speed; keep speed and endpoint service interval distinct.
Packet-size limits depend on both speed and transfer type; do not apply a bulk-endpoint table to interrupt or isochronous endpoints.
ZLP (zero-length packet) marks end of some transfers.