English
Language : 

SH7216 Datasheet, PDF (7/32 Pages) Renesas Technology Corp – USB Mass Storage Class
SH7216 Group
USB Function Module: USB Mass Storage Class
The fields are explained below.
• dCBWSignature:
This field identifies the data packet as a CBW. The value is 43425355h (Little Endian).
• dCBWTag:
This is the command block tag. It is used to connect the CSW with its corresponding CBW, and is specified by the
host PC.
• dCBWDataTransferLength:
This is the length of the data planned for transport. If this is 0, no data transport exists.
• bmCBWFlags:
If bit 7 of this field is 0, data is transported using bulk-out transport, and if it is 1, bulk-in transport is used. Bits 0 to
6 are fixed at 0.
• bCBWLUN:
This is the Logical Unit Number of the device sending the command block.
• bCBWCBLength:
This indicates the number of valid bytes for the next CBWCB field.
• CBWCB:
This field stores the command block to be executed by the function. The command that the host PC wants to execute
(the SCSI command in this sample program) is entered in this field.
3.3.2 Status Transport
Status transport is used to send the results of command execution from the function to the host PC, using bulk-in
transport.
This status packet is defined by the Command Status Wrapper (CSW). Bulk-Only Transport must always end with the
CSW.
The CSW is sent to the host as a 13-byte packet, using bulk-in transport.
It is sent in the format shown in table 4.
Table 4 Status Transport Formats
7
6
5
4
3
2
1
0
H'00-H'03
dCSWSignature
H'04-H'07
dCSWTag
H'08-H'0B
dCSWDataResidue
H'0F-H'1E
bCSWStatus
The fields are explained below.
• dCSWSignature:
This field identifies the data packet as the CSW. The value is H'53425355 (Little Endian).
• dCSWTag:
This is the command block tag. It ties the CBW to the CSW, and the same value is entered here as that of the
dCBWTag field of the CBW.
• dCSWDataResidue:
This reports any differences in the value of the CBW dCBWDataTransferLength and the actual amount of data
processed by the function.
• bCSWStatus:
This indicates whether or not a command has been successfully executed. If the command was executed
successfully, the function sets H'00 in this field.
Any value other than 0 indicates that the command was not executed successfully. Error values are as follows: H'01
indicates a failed command, and H'02 indicates a phase error.
REJ06B0897-0100/Rev.1.00
July 2009
Page 7 of 32