Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Mass storage commands are sent by the host through a structure called the Command Block Wrapper (CBW). For commands requiring a data transport stage, the host will attempt to send or receive the exact number of bytes from the device as specified by the length and flag fields of the CBW. After the data transport stage, the host attempts to receive a Command Status Wrapper (CSW) from the device detailing the status of the command as well as any data residue (if any). For commands that do not include a data transport stage, the host attempts to receive the CSW directly after CBW is sent. The protocol is detailed in Figure - MSC Protocol.

Anchor
Figure - MSC Protocol
Figure - MSC Protocol

Panel
borderWidth0
titleFigure - MSC Protocol

MSC ProtocolImage Added


Endpoints

On the device side, in compliance with the BOT specification, the MSC is composed of the following endpoints:

  • A pair of control IN and OUT endpoints called default endpoint.
  • A pair of bulk IN and OUT endpoints.

indicates Table - MSC Endpoint Usage indicates the different usages of the endpoints.

Anchor
Table - MSC Endpoint Usage
Table - MSC Endpoint Usage

Panel
borderWidth0
titleTable - MSC Endpoint Usage


EndpointDirectionUsage
Control IN
Control OUT
Device to Host
Host to Device
Enumeration and MSC class-specific requests
Bulk IN
Bulk OUT
Device to Host
Host to Device
Send CSW and data
Receive CBW and data



Class Requests

There are two defined control requests for the MSC BOT protocol. These requests and their descriptions are detailed in Table - Mass Storage Class Requests.

Anchor
Table - Mass Storage Class Requests
Table - Mass Storage Class Requests

Panel
borderWidth0
titleTable - Mass Storage Class Requests


Class RequestsDescription
Bulk-Only Mass Storage ResetThis request is used to reset the mass storage device and its associated interface. This request readies the device to receive the next command block.
Get Max LUNThis request is used to return the highest logical unit number (LUN) supported by the device. For example, a device with LUN 0 and LUN 1 will return a value of 1. A device with a single logical unit will return 0 or stall the request. The maximum value that can be returned is 15.



Small Computer System Interface (SCSI)

...

  • INQUIRY
  • READ CAPACITY(10)
  • READ(10)
  • REQUEST SENSE
  • TEST UNIT READY
  • WRITE(10)

Refer to  to Table - SCSI Commands to see the full list of implemented SCSI commands by µC/USB-Device.