Embedded USB Device Stack

Device Classes      Supported Controllers      Documentation      Prices      

Embedded USB Device StackThesycon’s USB device software stack implements the core functionality of a USB device and optionally provides device class specific protocols. It enables developers to easily add USB device functionality to embedded systems.

The software stack complies with the USB v1.1 and USB v2.0 specifications. It supports all transfer modes (control, bulk, interrupt, isochronous) at low, full and high speed. Complete USB request processing and extended error recovery mechanisms that are required for reliable operation are implemented internally.

The modular design allows to implement proprietary USB interfaces and standard device classes. The creation of composite devices which implement multiple logical functions on one physical controller as well as multi-configuration devices are fully supported.

Thesycon also offers the appropriate device drivers for PC and so it is able to provide complete software solutions.

USB Function Library

The USB Function Library is a software layer which is designed to handle the complete USB function peripheral. It implements all USB standard requests, the required state machines and the data transfer. An embedded application program does not have to access the USB peripheral via registers, it simply uses the software API defined by the USB Function Library.

To use the USB Function API directly without a device class, basic USB knowledge is required.

 

The Bulk Loop Demo application included in the demo packages represents a plain sample for the usage of the USB Function Library without a device class.

Device Classes

The device class specific APIs provide a high abstraction level and are easy to use. No USB know-how is required.

CDC/ACM Device Class

The CDC/ACM protocol module implements a standard-compliant serial link (RS-232) emulation on top of USB. This provides an easy migration path for existing applications. Thesycon also offers an appropriate CDC/ACM class driver for Windows operating systems. The combination of the CDC/ACM device class and the CDC/ACM class driver for Windows allows to re-use existing Windows applications unmodified.

The CDC/ACM Loop Demo application included in the demo packages represents a plain sample for the usage of the CDC/ACM device class.

The CDC/ACM Multi Instance Loop Demo application included in the demo packages represents a plain sample for the usage of the CDC/ACM device class with multiple instances (so called composite device).

RNDIS Device Class

The RNDIS module implements an Ethernet emulation on top of USB. This approach is especially useful if an embedded system contains an Ethernet interface and a TCP/IP protocol implementation. A suitable RNDIS device driver is included in Windows and some other operating systems.

The RNDIS Simple IP Demo application included in the demo packages provides very basic IP protocol functionality to support ARP, ICMP and DHCP. So it is possible to attach the device to a PC and to test the USB connection by means of ping.

Mass Storage Device Class

The Mass Storage protocol module emulates a disc drive with FAT or CD-ROM file system. It can be used to create a CD-less PC software installation, or to exchange static data files between the device and the PC. The required PC drivers are part of Windows, MacOS, and Linux. Under Windows the CD-ROM emulation supports the auto-run feature.

The Mass Storage Demo application included in the demo packages works as a block device driver for the memory. This sample implements the USB mass storage device that can expose multiple logical units (LUN). It supports the SCSI transparent command set and the emulation of CD-ROM and disk drives. The CD-ROM can be used to automatically start an application on Windows. A special compression algorithm can be used for ISO images. (At this time only integrated in the LPC1768 demo.)

HID Device Class

The THID module implements a generic HID device (Human Interface Device). The device does not require a device driver installation under Windows. It uses the in-box HID class driver. Applications can communicate with the THID device by means of Windows HID API functions. Thesycon provides sample application source code.

The THID Loop Demo application included in the demo packages is designed to demonstrate and test the data exchange.

Supported Controllers

The USB stack firmware is written in ANSI-C and can be ported to any hardware platform. For easy integration the software is designed as a library and provided as source code. The library does not depend on any specific operating system support. It can be integrated into any embedded OS, or can be used in stand-alone applications. Hardware access is encapsulated by a Hardware Abstraction Layer (HAL) which needs to be implemented in a platform-specific way. The stack supports 32-bit and 16-bit CPUs and works in either endian mode.

 

Atmel    
ARM Cortex-M3 core SAM3U1C, SAM3U2C, SAM3U4C
SAM3U1E, SAM3U2E, SAM3U4E
check for availability
ARM7 core AT91SAM7X, AT91SAM7XC
AT91SAM7S, AT91SAM7SE
AT91SAM7S161

AT91SAM7A3 (not recommended for new designs)

check for availability
ARM9 core AT91RM9200
AT91SAM9260, AT91SAM9261, AT91SAM9263
AT91SAM9XE
AT91SAM9G10, AT91SAM9G20, AT91SAM9G45
AT91SAM9R64, AT91SAM9RL64
AT91SAM9M10, AT91SAM9M11


check for availability
AVR32 core AT32UC3A0, AT32UC3A1, AT32UC3A3
AT32UC3B0, AT32UC3B1

AT32AP7000, AT32AP7001, AT32AP7002 (not recommended for new designs)
check for availability

 

NXP    
ARM Cortex-M3 core LPC1700 family :
LPC1751, LPC1752, LPC1754, LPC1756, LPC1758, LPC1764, LPC1765, LPC1766, LPC1768, LPC1769, LPC1774, LPC1776, LPC1777, LPC1778, LPC1785, LPC1786, LPC1787, LPC1788

check for availability
ARM 7 LPC2300 family :
LPC2388, LPC2387, LPC2378, LPC2368, LPC2366, LPC2364, LPC2362
LPC2400 family :
LPC2468, LPC2460, LPC2458, LPC2478, LPC2470, LPC2420

check for availability
ARM 9 LPC3000 family :
LPC3130, LPC3131, LPC3151, LPC3152, LPC3153, LPC3154, LPC3180/01
LPC3220, LPC3230, LPC3240, LPC3250

check for availability
NXP ISP ISP1582, ISP1583 check for availability

 

Fujitsu    
F2MC-16LX MB90335 series MB90F337 check for availability
F2MC-16FX MB96330 series MB96F338 check for availability
FR80 MB91660 series MB91V650 check for availability

 

Renesas    
RX62x, RX63x RX621, RX62N
RX630, RX631, RX63N
check for availability
H8SX 1653F, 1654F
1663F, 1664F
1663RF, 1664RF, 1668RF
check for availability
H8S 2462, 2472
2215C, 2215B, 2215, 2215T, 2215R
check for availability
M16C/6C Group M16C/6C check for availability

 

STMicroelectronics    
STR91xF   check for availability
STM32F103xx check for availability

 

Texas Instruments    
TI AM3517/AM3505 Please contact Thesycon for more information  

 

Other device controller drivers can be created on request. Please contact for more information.

Documentation

Memory Footprints

The code size and the memory requirements mainly depend on the processor architecture, the bit alignment as well as the used compiler and its optimization settings.

The following values are achieved on an ARM7 CPU in the release build without debug information. The ARM RealView compiler was used with default optimization (-O2). Data buffers as well as USB descriptors are not considered because they belong to the application layer. They have to be allocated in the application outside the Embedded USB Device Stack. Depending on the number of endpoints and the configuration of the device USB descriptors usually consume between 150 and 400 bytes of constant data.

 

Modul Code + const data (FLASH) Data (RAM) Description
USB Function ~ 10 KB ~ 0.5 KB native USBF with 2 endpoints
CDC/ACM ~ 1.7 KB ~ 0.2 KB single CDC/ACM instance with 3 endpoints
RNDIS ~ 3.5 KB ~ 1.8 KB single RNDIS instance with 3 endpoints

Licensing conditions & Prices

A device stack license includes the full source code and allows royalty-free distribution of binaries compiled from the sources. Distribution of source code is not permitted. For complete license conditions and prices please contact .

USB Vendor and Product ID

When designing a USB device you need an official USB vendor ID (VID) which is unique world-wide. Vendor ID's will be assigned by the USB Implementers Forum (www.usb.org). There is a fee of $1500 US.

 

Thesycon owns a USB vendor ID and provides a subset of product ID's (PID) to customers who licensed our USB software.

Keep up to Date

If you would like to be kept informed of product updates, please subscribe to the Thesycon newsletter.

 

 

© 2011 THESYCON

Device Driver - Software Development - Consulting home to the german version