Product manual

Spinpoint M9TU-USB 3.0 Product Manual REV 1.0
79
USB INTERFACE AND USB COMMANDS
6.4.3.2 Command Status Wrapper (CSW)
The CSW (Table 6-27) shall start on a packet boundary and shall end as a short packet with exactly 13 (0Dh)
bytes transferred. Fields appear aligned to byte offsets equal to a multiple of their byte size. All CSW transfers
shall be ordered with the LSB (byte 0) first (little endian). Refer to the USB Specification Terms and
Abbreviations for clarification.
Table 6-27: Command Status Wrapper
dCSWSignature:
Signature that helps identify this data packet as a CSW. The signature field shall contain the value 53425355h
(little endian), indicating CSW.
dCSWTag:
The device shall set this field to the value received in the dCBWTag of the associated CBW.
dCSWDataResidue:
For Data-Out the device shall report in the dCSWDataResidue the difference between the amount of data
expected as stated in the dCBWDataTransferLength, and the actual amount of data processed by the device. For
Data-In the device shall report in the dCSWDataResidue the difference between the amount of data expected as
stated in the dCBWDataTransferLength and the actual amount of relevant data sent by the device. The
dCSWDataResidue shall not exceed the value sent in the dCBWDataTransferLength.
bCSWStatus:
bCSWStatus indicates the success or failure of the command. The device shall set this byte to zero if the
command completed successfully. A non-zero value shall indicate a failure during command execution according
to the following table: (Table 6-28)
Table 6-28: Command Block Status Values
6.4.3.3 Data Transfer Conditions
This section describes how the host and device remain synchronized. The host indicates the expected transfer in
the CBW using the Direction bit and the dCBWDataTransferLength field. The device then determines the actual
direction and data transfer length. The device responds as defined in 6 - Host/Device Data Transfers by
transferring data, STALLing endpoints when specified, and returning the appropriate CSW.
6.4.3.3.1 Command Transport
The host shall send each CBW, which contains a command block, to the device via the Bulk-Out endpoint. The
CBW shall start on a packet boundary and end as a short packet with exactly 31 (1Fh) bytes transferred. The
device shall indicate a successful transport of a CBW by accepting (ACKing) the CBW. If the CBW is not valid -
CBW Not Valid. If the host detects a STALL of the Bulk-Out endpoint during command transport, the host shall
respond with a Reset Recovery.