SH7286 Group
USB Function Module: USB Mass Storage Class
R01AN0063EJ0100 Rev. 1.00
Page 8 of 32
Oct. 22, 2010
3.3.3 Data
Transport
Data transport defines the data transfer between the host and the function. When executing Read/Write command in
data transport, the host sends the exact number of bytes of data in sectors to the function, and vice versa.
Data transport consists of multiple bus transactions.
Data transfer in Data transport is either Bulk-Out transfer or Bulk-IN transfer, which is specified by the bmCBWFlags
of the CBW data.
(1) Data transport (Bulk-OUT transfer)
When bit 7 in bmCBWFlags field of the CBW data is 0, and dCBWDataTransferLength field of the CBW data is
not 0, Data transport is specified as Bulk-OUT transfer.
The function receives the amount of data expected as stated in dCBWDataTransferLength field to the host computer,
and receives the data which is required to execute the SCSI commands specified in CBWCB field of the CBW data.
(2) Data transport (Bulk-IN transfer)
When bit 7 in bmCBWFlags field of the CBW data is 1, and dCBWDataTransferLength field of the CBW data is
not 0, Data transport is specified as Bulk-IN transfer.
The function sends the amount of data expected as stated in dCBWDataTransferLength field to the host computer,
and sends the execution result of the SCSI commands specified in CBWCB field of the CBW data.
3.4 Class-specific
Requests
Class-specific requests are defined as a group of devices by USB class specification. These requests are made using
control transfer.
To use the USB Mass Storage Class Bulk-Only Transport as the data transfer protocol, the following commands listed
in Table 5 must be supported.
Table 5 Class-specific Requests
bRequest Field
Request Name
Description
255 (H'FF)
Bulk-Only Mass Storage Reset
Resets the interface
254 (H'FE)
Get Max LUN
Determines the number of logical units
When the function receives the Bulk-Only Mass Storage Reset request, it resets all the interfaces used by the USB Mass
Storage Class Bulk-Only Transport.
When the function receives the Get Max LUN request, it returns the maximum number of logical units available. As the
number of logical units in this sample program is 1, the function returns "0" to the host.