contact@embeddedgeeks.com
Embedded World

USB Architecture

Only one host can exist in the system and communication with devices is from the host‘s perspective. A host is an upstream component, while a device is a downstream component.

Data moved from the host to the peripheral is an OUT transfer. Data moved to the host from the peripheral is an IN
transfer. The host, specifically the host controller, controls all traffic and issues commands to devices.

There are three common types of USB host controllers:
Universal Host Controller Interface (UHCI): Produced by Intel for USB 1.0 and USB 1.1. Using UHCI requires a
license from Intel. This controller supports both Low-Speed and Full-Speed.
Open Host Controller Interface (OHCI): Produced for USB 1.0 and 1.1 by Compaq, Microsoft, and National
Semiconductor. Supports Low-Speed and Full-Speed and tends to be more efficient then UHCI by performing more
functionality in hardware.
Extended Host Controller Interface (EHCI): Created for USB 2.0 after USB-IF requested that a single host
controller specification be created. EHCI is used for High-Speed transactions and delegates Low-Speed and FullSpeed transactions to an OHCI or UHCI sister controller.

One or more devices are attached to a host. Each device has an address and responds to host commands that are
addressed to it. Devices are expected to have some form of functionality and not simply be passive. Devices contain
one upstream port. Ports are the physical USB connection point on the device.
A hub is a specialized device that allows the host to communicate with multiple peripheral devices on the bus. Unlike
USB peripheral devices, such as a mouse that has actual functionality, a hub device is transparent and is intended to
act as a pass-through. A hub also acts as a channel between the host and the device. Hubs have additional
attachment points to allow the connection of multiple devices to a single host. A hub repeats traffic to and from
downstream devices through one upstream port and up to seven downstream ports. The hub, however, does not
have any host capabilities.

As mentioned earlier, up to 127 devices can be connected to the host controller with the use of hubs. This limitation is
based on the USB protocol, which limits the device address to 7 bits. Additionally, a maximum of five hubs can be
chained together, which is limited due to timing constraints of hub and cable propagation delays. Below figure shows a
diagram of the USB tier system that represents the limitation of chaining hubs and devices together. You can see that
with the limitation on chaining hubs together, this produces a seven tiered system.

Another way to way to look at the USB interface is to divide it into different layers. The Bus
Interface Layer provides the physical connection, electrical signaling, and packet connectivity. This is the layer that is
handled by the hardware in a device. This is accomplished with the physical interface external to the device. The
Device Layer is the view the USB system software has for performing USB operations such as sending and receiving
information. This is accomplished with a Serial Interface Engine, which is also internal to the device. Finally, the
Function Layer is the software side of things. This is the portion of a USB device that does something with the
information it received or does something to gather data to transfer to the host.