USB Transfer Types

Last modified by Microchip on 2023/11/10 11:19

Universal Serial Bus (USB) transfer types refer to the mode of communication used between the Host and a device's endpoints. The transfer type determines the frequency and length of the transactions used to communicate with the endpoint. Transfer types can also assign a Cyclical Redundancy Checksum (CRC) to be verified with each packet transmitted. Transfer types are set by the device and are communicated to the Host during the enumeration process.

To facilitate Host software development and allow for interchangeability between different manufacturers' products, the USB Developers Forum has approved specifications for device classes. Device classes provide endpoint numbers, transfer types, and endpoint grouping for devices.

Consideration for Selecting Transfer Types

Latency

How quickly does the Host need to service the endpoint? To establish a deterministic latency, transactions must be scheduled at fixed intervals. For example, if an endpoint is scheduled to be serviced every 10 frames, the system would have a response time of 10 ms, using a full-speed USB. To guarantee latency, the endpoint is serviced at the prescribed interval regardless of pending activity. Allocating time for each frame to service, inactive devices limits the number of devices that can enumerate due to the finite free time in the frame.

Error Checking

Does the payload in the transaction need an accompanied CRC for reliable delivery? Most USB implementations use a hardware CRC generator to append the CRC to the message. To allow economical silicon solutions to be developed, USB designers have limited the packet size for transactions requiring CRC. Reduced packet size may limit the data rate of the device.

Bandwidth

The number of packets and the length of each packet affect the bandwidth. Increasing the size of a transaction will increase the bandwidth, but long packets do not provide for CRC checking. In addition, reserving portions of the frame for long high bandwidth transfers will limit the number of potential devices which can be enumerated to the Host. Increasing the number of times CRC-enabled transactions can be sent in a frame will increase bandwidth, but this approach poses the same enumeration dilemma presented by long frames.

Control and Configuration

A portion of the frame must be made available for the Host to enumerate new devices and send a control command to currently enumerated devices.

Transfer Types Used by USB

Short packets with CRC, scheduled at fixed periodic intervals. While the following diagram shows the transfer running every frame, interrupt transfers could be scheduled to run on intervals of frames, such as every 10 frames. Interrupt transfers will always occur regardless of whether or not there is any data to be transferred.

Transfer Types Used by USB

 Interrupt Transfers
BenefitsHigh-reliability data transfers with a fixed response time
DrawbackBandwidth may be limited (64 KBytes for Full-Speed USB)
Typical UseMice, Keyboards, and Medical Devices
NotesUp to 90 percent of the frame can be allocated for Interrupt endpoints.
The maximum length of the transfer depends upon the frame size used.

Isochronous Transfers

Longer packets without CRC. Isochronous transfers are scheduled at fixed periods. The frame bandwidth is released by the Host if communication with the endpoint is not needed.

Isochronous Transfers

 
Isochronous Transfers
BenefitsHigh bandwidth
DrawbackNo CRC hardware. If a CRC is needed it must be done in software. Long packets can limit the number of devices being enumerated.
Typical UseAudio/Video streaming, serial port emulation
NotesUp to 90 percent of the frame can be allocated for interrupt endpoints. When not in use the bandwidth used will be released. The maximum length of the transfer depends upon the frame size used.

Bulk Transfers

Short packets with CRC. Bulk transfers are not scheduled, they run when there is available bandwidth in the frame. Multiple bulk transfers can run in a single frame if there is bandwidth available

Bulk Transfers

 Bulk Transfers
BenefitsHigh reliability with the potential for high bandwidth
DrawbackBandwidth may vary depending upon the number of interrupt endpoints enumerated and the activity of enumerated Isochronous endpoints. 
Typical UseMass Storage and Printers
NotesWill take advantage of unused Isochronous bandwidth.
The maximum length of the transfer depends upon the frame size used.

Learn More