Specifications

5
5
What is USB?
Serial protocol—strictly defined frame and
packet based protocol with error checking and
handshaking. LSB in first, MSB last.
Half Duplex—all transactions initiated by the
host with data carried by the D+ and D- signals
in both directions
Device Management—host assigns addresses
to newly attached devices and removes support
for detached devices. Host also manages
bandwidth.
Power Management—use of Suspend mode
to conserve power on the bus. Vbus sourced
by host is +5V ±5%.
Direction—all transactions are directed with
respect to the host. IN transactions send data
from the peripheral to the host. OUT
transactions send data from the host to the
peripheral.
Host Controller
Root Hub
Peripheral
Hub
Peripheral
Hub
Peripheral Peripheral
The USB protocol is a packet based architecture with start frame, transactions, and handshaking with
ack and nak controls. These will be covered later. Within the host there is the USB controller and
the root hub. The Host controller formats the data for the OS on read and write as well as manages
communications on the bus. The Root Hub provides the connection point to the host for peripheral
devices as well as detects attach/removal events, carries out requests from the host and is the means
to pass data. USB is a half duplex protocol where all data is passed via a two wire interface called
D+ (D plus) and D- (D minus). The host processor is responsible for all communications on the bus
including device addressing and bus bandwidth. It is also responsible for determining and
conserving the power requirements for the bus. If devices do not meet the requirements for all of the
above conditions then the host can refuse to enumerate. When we discuss data transfer across the
USB we always use the vantage point of the host for reference. For example, if there is an IN
transfer that means the host is going to receive the data. An OUT transfer means the host is going to
transmit data.
Before proceeding let’s quickly discuss the data transfer hierarchy. The term “pipe” is used to define
a logical association between the host and the endpoint device and is the connection point for the
host software and the device. There are two types of pipes identified in the USB specification. The
stream pipe is used for unidirectional communications and comprises most of the transfer types
defined. The Message pipe is a bidirectional pipe and is typically used only for control transfers or
the transfers that the USB uses for configuring devices and the bus. The control transfer is a transfer
using endpoint 0 which is the only bidirectional transfer and therefore a message pipe. There are
IN/OUT transfers, however each endpoint is either an IN or an OUT transfer. This is where the
unidirectional stream pipes come into play. The transfer is the highest level of the USB protocol and
is used to define the structure of the information that is sent across the wires. The transfer is broken
up into a set of transactions. These transactions are then subdivided into a set of packets that are the
lowest level defined in the USB specification. The following slides build the data from when we
plug in the cable all the way up to the transfer format. This will become more evident as we progress
through the course.