![Freescale Semiconductor MC9S12 User Manual Download Page 26](http://html.mh-extra.com/html/freescale-semiconductor/mc9s12/mc9s12_user-manual_2330502026.webp)
USB Mass Storage Driver
MC9S12UF32 Card Reader Reference Design User Manual, Rev. 0.1
26
Freescale Semiconductor
6.3.1.1 Commands Without Data Transfer.
Since no data transfer is required, after processing the CBW, the UF32 will return the 13 bytes of CBW.
6.3.1.2 Host Sends out Data to Storage Device.
After sending out a 31 byte CBW, the host continues to send data to the UF32. If an error happens and
the UF32 has not acknowledged (ACK) all the data from the host, the OUT endpoint is STALLED to inform
the host that the UF32 is not able to accept any further data. After the UF32 receives all the data from
host and sends all the data to the storage, it will check whether the device has successfully received the
data without any error.
6.3.1.3 Host Receives Data from Storage Device.
After sending out a 31 byte CBW, the host expects the storage device to send out data. If an error
happens and the host has not acknowledged (ACK) all the data from the device, a zero length data will
be sent out for next IN token to inform the host that there is no more data to transfer.
Figure 6-2. CBW Command Handling
HOST SENDS OUT CBW
OUT
DATAx
31 BYE CBW
NEED TO CALL
DEVICE DRIVER?
USBMS_SendCSW()
RETURN PASS, FAILED,
OR PHASE ERROR
CFMS_SCSIList[]()
MSMS_SCSIList[]()
SDMS_SCSIList[]()
SMMS_SCCIList[]()
ComapctFlash
Memory Stick
Security Digit
MultiMediaCard
SmartMedia
SCSI COMMAND
HANDLING