Information Technology Reference
In-Depth Information
In the most common situation (case 6), the device intends to send dCBW-
DataTransferLength bytes. The device sets bCSWStatus to 00h or 01h and
sets dCSWDataResidue to zero.
If the device expects to send no data (case 4) or less than dCBWDataTrans-
ferLength bytes (case 5), the device may pad the data up to the requested
length, or the device may send no data or less data. A device that sends less
than the requested amount of data must stall the bulk IN endpoint. In
either case, the device sets bCSWStatus to 00h or 01h and sets dCSWDa-
taResidue to the difference between dCBWDataTransferLength and the
amount of data sent, excluding any pad bytes.
If the device expects to send more than dCBWDataTransferLength bytes
(case 7) or expects to receive data from the host (case 8), the device may
send up to dCBWDataTransferLength bytes. On sending less than dCBW-
DataTransferLength bytes, the device must stall the bulk IN endpoint and
set bCSWStatus to 02h. On sending dCBWDataTransferLength bytes, the
device may stall the bulk IN endpoint and must set bCSWStatus to 02h.
On receiving bCSWStatus = 02h, the host ignores dCSWDataResidue and
performs a reset recovery or resets the device's port.
The Host Expects to Send Data
When dCBWDataTransferLength is greater than zero and the Direction bit
in bmCBWFlags = 0, the host expects to send data in the data-transport
phase.
In the most common situation (case 12), the device expects and receives
dCBWDataTransferLength bytes. The device sets bCSWStatus to 00h or
01h and sets dCSWDataResidue to zero.
If the device expects to receive less than dCBWDataTransferLength bytes
(case 11) or no data (case 9), the device may accept dCBWDataTransfer-
Length bytes (recommended) or the device may end the transfer early by
stalling the bulk OUT endpoint. In either case, the device sets bCSWStatus
to 00h or 01h and sets dCSWDataResidue to the difference between dCB-
WDataTransferLength and the amount of data processed. The amount of
data processed by the device can be less than or equal to the amount of data
received and accepted by the device. Stalling the bulk OUT endpoint in
these cases can cause problems under Windows, so most devices accept
Search WWH ::




Custom Search