SH7286 Group
USB Function Module: USB Mass Storage Class
R01AN0063EJ0100 Rev. 1.00
Page 25 of 32
Oct. 22, 2010
5.7 Error
Handling
This section describes errors occur between the host computer and the function, and error handling by the function
when transferring data in the USB Mass Storage Class (Bulk-Only Transport).
The USB Mass Storage Bulk-Only Transport defines the following error cases:
⎯
CBW Not Valid
⎯
Device intent does not meet the host’s expectations (10 cases)
Other cases are not defined in the USB Mass Storage Bulk-Only Transport specification.
There are thirteen possible cases of data transfer between the host and function listed in Table 20 and Table 21. Cases
(1), (6), and (12) are normal transfers.
Table 20 Host/Function Data Transfer Matrix
Host
Host expects no data
transfer
Host expects to
receive data from the
function
Host expects to send
data to the function
Function intends to transfer
no data
(1) Hn = Dn
(4) Hi > Dn
(9) Ho > Dn
(5) Hi > Di
(6) Hi = Di
Function intends to send data
to the host
(2) Hn < Di
(7) Hi < Di
(10) Ho < > Di
(11) Ho > Do
(12) Ho = Do
Function
Function intends to receive
data from the host
(3) Hn < Do
(8) Hi < > Do
(13) Ho < Do
Table 21 Host/Function Data Transfer Cases
CASE
Relationship between Host and Function
(1)
Host expects no data transfer, and function intends to transfer no data
(2)
Host expects no data transfer, and function intends to send data to the host
(3)
Host expects no data transfer, and function intends to receive data from the host
(4)
Host expects to receive data from the function, and function intends to transfer no data
(5)
The amount of data received from the function that the host expected is less than the amount of data that the
function sends to the host
(6)
The amount of data received from the function that the host expected and the amount of data that the function
sends to the host are the same
(7)
The amount of data received from the function that the host expected is more than the amount of data that the
function sends to the host
(8)
Host expects to receive data from the function, and function intends to receive data from the host
(9)
Host expects to send data to the host, and function intends to transfer no data
(10)
Host expects to send data to the host, and function intends to send data to the host
(11)
The amount of data that the host expected to send to the function is less than the amount of data the function
receives from the host
(12)
The amount of data that the host expected to send to the function and the amount of data that the function
receives from the host are the same
(13)
The amount of data that the host expected to send to the function is more than the amount of data that the
function receives from the host