Design
USB host and device drivers speed embedded systems development
Now available from Computer Solutions are the Micro Digital range of USB drivers - the smxUSBH USB host stack, the smxUSBD USB device stack and the smxUSBO 'On-The-Go' stack - all of which help embedded developers by providing easy interfacing between their embedded systems and
USB. The smxUSBD USB device stack is designed for situations in which a developer wants the embedded application to plug into a PC and exchange data with the PC or to be controlled by the PC.
The read or written by the embedded application.
An 'On-The-Go' (OTG) stack is also available where dual-role devices need to function as a limited capability host as well as a USB peripheral (e.g. a printer being able to link to a camera without requiring a PC).
These stacks are offered separately to minimise system cost and memory usage for projects that only need one function. They are all compliant with the USB v2 specification to support low, full and high speed USB operation in all four modes (control, bulk, interrupt and isochronous).
Support is provided for the most popular USB interface chips from NXP as well as common on-chip interfaces provided with ARM, ColdFire and Power PC microcontrollers. Host stack support is available for interface chips that conform to the EHCI, OHCI and UHCI specification, with more interfaces being
added to the list every month.
For easy connectivity to a PC or laptop, smxUSBD includes three class emulators: serial, mouse, and mass storage. Each is compatible with the corresponding Windows USB class driver. This means that a device using smxUSBD does not require a custom Windows driver in order to connect to a PC
or laptop. All that is needed is to decide on the most appropriate device connection and to use the corresponding API for that device.
All drivers are written in C, and can be ported to any 32-bit hardware platform with ARM, ColdFire, Power PC and x86 versions being available off the shelf. Although optimised for the Micro Digital real-time operating system (smx), they can be ported to other RTOSs or can be run in a
stand-alone environment. Modular design ensures that only what is needed
will be linked into the final application.
Both host and device drivers are available integrated into the smxFS FAT 32 file system so that PC compatible files can be created, read and written to thumb drives or so that the embedded device can appear to act like a thumb drive or other attached mass storage device.
Demo programs that use these USB stacks and access thumb drives are available for a number of the most popular CPU evaluation boards.