µC/USB Device Overview
You are here : Micrium
: Products : µC/USB Device :
Overview
µC/USB-Device
µC/USB-Device is a compact, reliable USB device stack. Built to be portable, scalable and robust, µC/USB-Device enables the rapid integration of USB support in your embedded system, thereby minimizing your time to market.
FEATURES and BENEFITS
| Cleanest Source Code |
µC/USB-Device provides you with the highest quality source code in the industry. µC/USB-Device is written in ANSI C enabling its usage with a wide array of best-of-class cross-development tools. |
| Portable |
µC/USB-Device can be used on 8, 16, 32 and even some 64-bit CPUs. |
| Flexible |
µC/USB-Device has been designed to work with any USB device controller (both full-speed and high-speed), and ports for many common controllers are available. It is compliant with USB v1.1 and v2.0, and has been tested with the USB-IF's command verifiers. Interface drivers are provided for several standard classes--including mass storage, HID and CDC--and a flexible USB class driver interface expedites support for new device classes. µC/USB-Device canbe used with or without an RTOS. |
| Royalty Free |
µC/USB-Device is licensed on a per-end-product basis. Each different product that embeds µC/USB-Device requires a different license. |
ARCHITECTURE
µC/USB-Device consists of three layers: A driver for hardware access, the stack core and at least one USB interface driver:
|
 |
1. |
Interface driver layer. The USB specification divides devices into different classes, subclasses and protocols. Each interface driver in this layer implements the protocol for a certain device class and subclass. For example, the mass storage class (MSC) interface driver allows the device to appear as a USB storage drive when connected to a PC.
|
2. |
Device stack core. The device stack core controls packet reception and transmission and responds to standard host requests during enumeration (the process by which a host discovers the features of a device).
|
| 3. |
Device controller driver. Each target must have a device controller driver which interfaces with the device controller hardware to process interrupts, notify the stack core of bus events and receive and transmit packets. A hardware abstraction layer makes it easy to port µC/USB-Device to new USB controllers by simply modifying hardware access routines.
|
|
CLASS SUPPORT
Every USB device must have one or more interfaces or features. These features operate separately, and each is supported by a class driver which provides some functionality to the host. Micrium offsers drivers for standard USB classes (Mass Storage, CDC, HID) and for a bulk transfer interface.
Mass Storage Class (MSC).
This driver enables you to use your embedded target device as a USB mass storage device. Since every major operating system supports this device class out of the box, no host operating system driver need be developed. Simply plug-in your device and use it. The target needs no file system code, since the host OS provides the file system for interpreting the disk’s information. You have to provide file system program code on the target only if you want to access files from within the target application itself (see μC/FS in this catalog). For more information, see the mass storage class page.
Human Interface Device (HID) Class.
Common HIDs include mouses and keyboards, but the same host driver that supports these provides the means for communication with any HID. Consequently, this class driver can allow the target to use a standard USB class (without the need for a special host driver) for a vendor-specific communication protocol. Data is exchanged between the host and the device in the form of fixed-length structures called reports. The flexibility of the report structure accommodates almost any type of data. Because this device class uses only control and interrupt endpoints, the throughput is limited to 64 kBytes/sec (full-speed) or 24 MBytes/sec (high-speed).
Communications Device Class (CDC).
The driver for this class converts the target device into a serial communication device. The target will be recognized by the host as a serial interface (USB2COM, virtual COM port), without the need to install a special host driver since CDC is one of the standard device classes for which every major operating system already provides a host driver. All PC software using a COM port will work without modification with this virtual COM port.
Bulk. With this class driver, the target will use bulk transfers to exchange data with the host. Unlike the HID class, a special host driver is needed, because Windows does not natively support this type of device. A Windows driver is provided as an executable (*.sys), though it is also available as source code. Since bulk, rather than interrupt, transfers are used by this driver, it can be much faster than HID—up to 1.1 MBytes/sec (full-speed) or 50 MBytes/sec (high-speed).
Other Standard Classes. Additional class drivers are being developed. Contact us for more information about a particular class driver.
Vendor-specific. A class driver can easily be written for a vendor-specific class.
Composite Devices. A composite device has more than one interface/feature. µC/USB-Device supports composite configurations with any standard, bulk or vendor-specific interface. For example, a device may be both a mass storage device and an HID, or a CDC device and a mass storage device.
MEMORY FOOTPRINT
The following memory footprints were derived for an Cortex-M3 target using IAR's EWARM V4.41A. ROM sizes are shown for ARM mode, with Thumb mode in parentheses. Compiler optimization set for maximum optimization for either size or speed as indicated. µC/USB-Device options were set to default values.
For µC/USB-Device, we have excluded the device controller driver and BSP layers since these are device controller- and board-specific.
µC/USB-Device
LAYERS |
ROM Size, kB
|
RAM Size, kB |
Compiler
optimized
for Size
|
Compiler
optimized
for Speed |
| Core |
4.9 |
6.1 |
0.8 |
| C Library |
1.0 |
1.0 |
0.0 |
| CDC Class Driver |
1.5 |
1.7 |
1.1 |
| HID Class Driver |
1.0 |
1.1 |
0.2 |
| MSC Class Driver |
3.5 |
4.4 |
1.3 |
| Bulk Class Driver |
1.4 |
1.5 |
0.2 |
|