USB Transfer Types (Endpoint Types)- Explained

USB



In this article, we explain the USB transfer types (endpoint types), which are different ways of transferring data with the USB system.

Endpoints are responsible for sending or receiving data to or from the host.

USB devices connected to the host would represent endpoints, because they can receive or send data.

Now we must specify what type of endpoint each device will be configured as.

The different transfer types (or endpoint types) are interrupt transfer, bulk transfer, isochronous transfer, and control transfer.

Each endpoint can be configured as one of such, again, interrupt, bulk, isochronous, or control.

The USB device tells the host about the configuration of its endpoints in the early stage of device enumeration.

So when you connect a USB device to a port connected to the host, the device will send its descriptors to the host, so that the host knows what type of endpoint it is working with.

An important thing to note is that endpoint 0 should always be configured to be a control endpoint. USB endpoint 0 performs control transfers.

So let's now review the different transfer (or endpoint) types of the USB communication protocol.


Interrupt Transfer (Interrupt Endpoint)

The first type of transfer or endpoint we will go over is the interrupt transfer.

The interrupt transfer is a periodic transfer, which means that data will be sent regularly and frequently.

The interrupt transfer guarantees bus bandwidth. Therefore, it limits latency.

This type of transfer guarantees error-free transmission, because it has error detection.

This type of endpoint will be used when we need to get updates regularly from a device.

Examples of this would be from devices such as a mouse, keyboard, or joystick. Devices where we need regular updates.

The interrupt transfer can send a maximum data payload of 64 bytes for full speed and up to 1024 bytes for high speed.


Bulk Transfer

The next type of transfer is the bulk transfer (or bulk endpoint).

The bulk transfer is a non-periodic transfer. This is a transfer that does not happen regularly, or periodically, but only on need.

An example of this is writing data to an external USB storage device.

This does not need to occur regularly, only when the user needs to backup the data to the storage device.

Bulk transfer has no guarantee of bus bandwidth, so no specific latency is guaranteed.

Bulk transfer guarantees error-free transfer, because it has error detection. Therefore, the receiving data will send back handshake packets, confirming the data sent.

Bulk transfer, as the name suggests, is used to transfer large amounts of data.

The maximum packet size is 8,16,32, or 64 bytes for full speed, and 512 bytes for high speed.

Low speed USB transfer does not support bulk transfer.


Isochronous Transfer

Isochronous transfer, like the interrupt transfer, is a periodic transfer. This means we regularly receive the transfer of new data at regular time intervals.

The isochronous transfer type guarantees bus bandwidth, so there is limited latency.

An important point is that isochronous transfer does not have error detection. Therefore, there is no handshake packet associated with this transfer method, which means there is no confirmation from the receiving device that it has received the data successfully and error free or not. Therefore, the isochronous transfer type only has 2 packets, the token packet and the data packet.

The isochronous transfer method has a maxmum data payload of up to 1023 bytes for full speed and up to 1024 bytes for high speed.

The isochronous method is typically used with devices such as camera streaming and microphones.

In the world today with plenty of conferencing due to the pandemic, use of webcam streaming and microphones are very commonplace.

Video and microphones (but especially video) is very data intensive. If error detection was part of this transfer type, it would slow down the process. It would create extra delay or latency, which is undesired. Therefore, there is no error detection with this transfer type. Just think about it, if you are on a conference call with someone and there is a momentary drop in video or microphone, it's not critical, because you can ask the person to repeat something s/he said. It's not a critical life-or-death situation, like other systems would be such as rocket ships. Therefore, this method works with these such devices.

So the device with a isochronous endpoint is used to transfer a large amount of data without caring if some of the data gets missed or is corrupted.

This method would not be used if you need to send files, for example, because if any bit is corrupted, it can cause the whole file or files to be corrupted. For files, there would have to error checking to ensure that the files are uncorrupted and usable at the receiving end. You would not want to send files without error checking and then the receiver cannot access the files, because they are corrupted.


Control Transfer

The control transfer, or the control endtype, is a little different than all the other transfer types, because the control transfer

Control transfer is a non-periodic transfer, which means data is only sent when needed.

Control transfer guarantees error-free transmission of data, because it has error detection.

Control transfer is used when we need to transfer device enumeration and configuration packets. This can be seen as a negotiation between the host and device.

Note that Endpoint 0 (IN and OUT) must be configured to operate as Control Transfer.

The maximum data pyaload are 8,16,32, or 64 bytes for full speed and 64 bytes for high speed.

One key difference between control endpoints and all others (interrupt, bulk, or isochronous) is that control transfer occur not with a single USB transaction like all the rest, but occurs with multiple transactions.

Control transfer consists of 3 stages: the Setup stage (one transaction), the Data stage (optional; zero to multiple transactions), and the Status stage (one transaction).

So this was a brief summary of the USB transfer types (or endpoint types) and the most likely reasons you would use each for when using the USB communication protocol.



Related Resources





HTML Comment Box is loading comments...