Product manual

Spinpoint M9TU-USB 3.0 Product Manual REV 1.0
78
USB INTERFACE AND USB COMMANDS
6.4.3.1 Command Block Wrapper (CBW)
The CBW (Table 6-26) shall start on a packet boundary and shall end as a short packet with exactly 31 (1Fh)
bytes transferred. Fields appear aligned to byte offsets equal to a multiple of their byte size. All subsequent data
and the CSW shall start at a new packet boundary. All CBW transfers shall be ordered with the LSB (byte 0)
first (little endian). Refer to the USB Specification Terms and Abbreviations for clarification.
Table 6-26: Command Block Wrapper
dCBWSignature:
Signature that helps identify this data packet as a CBW. The signature field shall contain the value
43425355h (little endian), indicating a CBW.
dCBWTag:
A Command Block Tag sent by the host. The device shall echo the contents of this field back to the host in the
dCSWTag field of the associated CSW. The dCSWTag positively associates a CSW with the corresponding
CBW.
dCBWDataTransferLength:
The number of bytes of data that the host expects to transfer on the Bulk-In or Bulk-Out endpoint (as indicated
by the Direction bit) during the execution of this command. If this field is zero, the device and the host shall
transfer no data between the CBW and the associated CSW, and the device shall ignore the value of the Direction
bit in bmCBWFlags.
bmCBWFlags:
The bits of this field are defined as follows:
Bit 7 Direction - the device shall ignore this bit if the dCBWDataTransferLength field is zero, otherwise:
0 = Data-Out from host to the device,
1 = Data-In from the device to the host.
Bit 6 Obsolete. The host shall set this bit to zero.
Bits 5..0 Reserved - the host shall set these bits to zero.
bCBWLUN:
The device Logical Unit Number (LUN) to which the command block is being sent. For devices that support
multiple LUNs, the host shall place into this field the LUN to which this command block is addressed. Otherwise,
the host shall set this field to zero.
bCBWCBLength:
The valid length of the CBWCB in bytes. This defines the valid length of the command block. The only legal
values are 1 through 16 (01h through 10h). All other values are reserved.
CBWCB:
The command block to be executed by the device. The device shall interpret the first bCBWCBLength bytes in
this field as a command block as defined by the command set identified by bInterfaceSubClass.
If the command set supported by the device uses command blocks of fewer than 16 (10h) bytes in length, the
significant bytes shall be transferred first, beginning with the byte at offset 15 (Fh). The device shall ignore the
content of the CBWCB field past the byte at offset (15 + bCBWCBLength - 1).