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 manufacturers 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 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 which can enumerated 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 control command to currently enumerated devices.

Transfer types used by USB

As a result of the for-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 Transfers
Benefits High reliability data transfers with fixed response time.
Drawback Bandwidth may be limited (64 KBytes for Full Speed USB)
Typical Use Mice, Keyboards, Medical Devices
Notes Up to 90% of 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 schedule at fixed periods. The frame bandwidth is released by the Host if communication with the endpoint is not needed.

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 amount of devices being enumerated
Typical Use Audio/Video streaming, serial port emulation
Notes Up to 90% of 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

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

 
USB Speeds and Specifications
Learn more >
 
Developing USB Applications
Learn more >
 
Type-C USB
Learn more >
 
USB Power Distribution
Learn more >

20th Annual
Microchip MASTERs Conference 2016
Register now - Deadline: July 29

JW Marriott Desert Ridge Resort-Phoenix, AZ

© 2016 Microchip Technology, Inc.
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.