USB Transfer Types

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 manufacturer's products, the USB Developers Forum has approved specifications for device classes. Device classes provide for 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 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, the 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 enumerated new devices and send a control command to currently enumerated devices.

Transfer types used by USB

As a result of the fore-mentioned considerations, the USB Developers Forum has approved the following transfer types for USB:

Interrupt Transfers

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.

interrupt-transfer.svg
Interrupt Transfers
Benefits High-reliability data transfers with the fixed response time.
Drawback Bandwidth may be limited (64 KBytes for Full-Speed USB)
Typical Use Mice, Keyboards, and Medical Devices
Notes Up to 90% 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-transfer.svg
Isochronous Transfers
Benefits High bandwidth
Drawback No CRC hardware. If a CRC is needed it must be done in software.
Long packets can limit the number of devices being enumerated
Typical Use Audio/Video streaming, serial port emulation
Notes Up to 90% 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-transfer.svg
Build Transfers
Benefits High reliability with the potential for high bandwidth
Drawback Bandwidth may vary depending upon the number of interrupt
endpoints enumerated and the activity of enumerated Isochronous endpoints.
Typical Use Mass Storage and Printers
Notes Will take advantage of unused Isochronous bandwidth
The maximum length of the transfer depends upon the frame size used

 Learn More


© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.