In order to connect a USB mass storage device (memory stick) to an embedded
system, a USB Mass Storage host driver stack needs to be implemented on the
microcontroller. This driver stack consists of three major components as shown
in the figure.
FAT File System
The highest level software layer is the file system driver. It manages
files and directories on the storage media according to the FAT file system
standard. The file system driver maps logical objects (files, directories,
attributes, etc.) to structures (sectors) on the physical storage media. At
its upper edge the file system driver exposes a software interface that provides
standard file operations (open, close, read, write).
Thesycon recommends to use SEGGER's emFile
which is a generic FAT file system driver implemented in C. See http://www.segger.com
for more information.
USB Mass Storage Host Library (TUMlib)
This software layer implements the USB Mass Storage device class protocols
specified by the USB Implementers
Forum. TUMlib maps read/write requests issued by the file system driver
to protocol-specific SCSI-style commands. It also implements initialization,
discovery and error recovery. For more information on Thesycon's TUMlib, see
below.
Host Controller Driver
This driver layer controls the USB host controller hardware (e.g. Philips
ISP1362) that is integrated into the embedded system. It is responsible for
generating the appropriate USB transactions required to carry out USB requests
issued by the protocol layer. The driver exposes a programming interface that
supports USB setup requests and bulk transfers from/to individual endpoints.
Besides the driver supports USB device enumeration and address assignment.
Because there is no USB host controller hardware standard for embedded systems
a specific implementation of the host controller driver is required for each
individual host controller. Thesycon offers a host controller driver for Fujitsu
FFMC-16LX MB90330 series microcontrollers. Check out our Fujitsu
USB Minihost API for more information. Thesycon can also provide other
host controller drivers for licensing.
The demo package includes the source code of the TUM Demo application and TUMlib and emFile as static link libraries (.lib). To compile the demo application, Visual C++ 6.0 or better is required. The sample code shows how to initialize TUMlib and emFile and connect these two layers together. The demo application uses Thesycon's generic USB device driver USBIO instead of a host controller driver layer. Thus, the demo application communicates with the mass storage device via the Windows USB host driver stack.
In order to remove the TUMlib demo package from your system and to restore
the original functionality, disconnect the memory stick and uninstall the
software via Control Panel - Add/Remove Programs. After that, when the memory
stick is connected again Windows recognizes it as a removable disk and provides
access to its volume(s).
If you would like to be kept informed of product updates, please subscribe to the Thesycon newsletter.
© 2008 THESYCON


