MC9S12UF32 Card Reader Reference Design User Manual, Rev. 0.1
Freescale Semiconductor
21
Chapter 6
USB Mass Storage Driver
6.1 Introduction
The driver is implemented according to the specification of the USB Mass Storage Class Bulk-Only
Transport and the specification of the Small Computer System Interface 2.
We have chosen the Bulk-Only transport rather than the Command Bulk Interrupt because the drivers for
the Bulk-Only transport are embedded in the Windows 2000 and the Windows XP. Regarding the
endpoints usage, one bulk IN and one bulk OUT endpoints together with the control endpoints are
needed. The subclass of the SCSI Transparent command 0x06 is used since the SCSI command can
support most storage and multimedia devices.
6.2 USB Mass Storage Class Bulk-Only Transport
In Bulk-Only Transport, the transfer of command, data and status occurring solely via Bulk endpoints.
There are two class specific requests through the SETUP command
•
Bulk-Only Mass Storage Reset
•
Get Max LUN.
The
Bulk-Only Mass Storage Reset
is to reset the mass storage device and its associated interface. The
GetMax LUN
is used to determine the number of logical units the device supports.
The host shall send out a Command Block Wrapper through an OUT endpoint before sending out data or
requesting the device to return data. The device then responses with the Command Status Wrapper.
Figure 6-1
shows the command data status flow.