Embedded USB

Understanding Embedded USB

USB is the fastest growing interface/bus standard in the embedded industry. Its popularity seems driven by the low cost of hardware and the value of its plug and play features. In response to customer demand, Quadros Systems has developed a suite of USB solutions designed to simplify the implementation of USB-compliant products. With the increasing complexity of embedded systems, smaller engineering teams, shorter development schedules and the need for code portability, it makes sense for many customers to license commercial software rather than build it. However, as simple as we have made the USB development process it is still important for the developer to have a basic understanding of USB terminology.

Embedded USB Architecture
USB Components

To understand what you need to support USB in your embedded system it is important to understand the key pieces in a USB system. Here is a brief description. More detailed information is contained in the USB 2.0 spec maintained by the USB Implementers Forum.

Because USB is a host-controlled bus, the Host is a critical piece in a USB system. The Host detects the attachment of USB devices, determines the type of device, loads the appropriate drivers and manages the flow of data.

USB Devices (or peripherals) are function-specific devices that can be recognized and enumerated by a Host. Each device supports one or more pipes through which the Host can communicate. The Host uses an enumeration process to recognized USB Devices.

USB Class Drivers are used to implement specific functions such as mass storage and communications. A class is a group of devices or interfaces which have common attributes with data streams having similar data formats. The Class is used by the Host to identify a driver responsible for managing the interface. Each type of USB function requires a corresponding class driver on both the host and device sides of the bus.

USB Controllers (Host and Device) are responsible for the physical connection between the Host and Device systems. Controller Drivers are required to initialize the hardware and prepare it to respond to the system software.

Differences from PC-based USB host systems

A USB host in an embedded system is quite different from that of a PC. A PC is a general, multi-purpose computing platform; an embedded system is usually a more narrowly defined, special purpose environment.

A USB host in a PC must be able to enumerate virtually any USB device. If the driver software is not available, it can prompt the user to install it. Because the embedded system is more narrowly defined it will only enumerate one or two USB device types. Usually the embedded system does not have a user interface or the I/O capability to install new drivers so all drivers must be pre-loaded into the system.

A USB device (peripheral) will have the same functionality whether it is used as part of an embedded application or if it is a PC peripheral.