USB communications

This article provides information about the communications aspects of Universal Serial Bus (USB): Signaling, Protocols, Transactions.

USB also supports signaling rates from 1.5 Mbit/s (Low speed) to 80 Gbit/s (USB4 2.0) depending on the version of the standard.

The article explains how USB devices transmit and receive data using electrical signals over the physical layer, how they identify themselves and negotiate parameters such as speed and power with the host or other devices using standard protocols such as USB Device Framework and USB Power Delivery, and how they exchange data using packets of different types and formats such as token, data, handshake, and special packets.

Some personal computer chipset manufacturers overcome this bottleneck by providing multiple USB 2.0 controllers within the southbridge.

In practice and including USB protocol overhead, data rates of 320 Mbit/s (38 MB/s) are sustainable over a high-speed bulk endpoint.

[2] Throughput can be affected by additional bottlenecks, such as a hard disk drive as seen a in routine testing performed by CNet, where write operations to typical high-speed hard drives sustain rates of 25–30 MB/s, and read operations at 30–42 MB/s;[3] this is 70% of the total available bus bandwidth.

They are defined in the referenced document as part of the electrical test description for the high speed (HS) mode at 480 Mbit/s.

[citation needed] According to a USB-IF chairman, "at least 10 to 15 percent of the stated peak 60 MB/s (480 Mbit/s) of Hi-speed USB goes to overhead—the communication protocol between the card and the peripheral.

The bus bandwidth therefore only has an effect on the number of channels that can be sent at a time, not the speed or latency of the transmission.

For USB 3.0, additional data transmission encoding is used to handle the higher signaling rates required.

A special protocol during reset, called chirping, is used to negotiate the high speed mode with a host or hub.

If the host/hub is also HS capable, it chirps (returns alternating J and K states on D− and D+ lines) letting the device know that the hub operates at high bandwidth.

Because SuperSpeed and beyond uses wiring that is separate and additional to that used by earlier modes, such bandwidth negotiation is not required.

USB 3 uses tinned copper stranded AWG-28 cables[7] with 90±7 Ω impedance for its high-speed differential pairs.

Error detection is provided by transmitting four bits, which represent the packet type twice, in a single PID byte using complemented form.

This is required as a USB hub functions as a very simple repeater, broadcasting the host message to all connected devices regardless if the packet was for it or not.

Then a low-bandwidth packet follows, beginning with a sync sequence and PID byte, and ending with a brief period of SE0.

[16] Also, after the descriptors is retrieved, the host performs another control transfer exchange, but instead to set the address of the USB device to a new ADDRx.

Example of a Negative Acknowledge packet transmitted by USB 1.1 full-speed device when there is no more data to read. It consists of the following fields: clock synchronization byte, type of packet, and end of packet. Data packets would have more information between the type of packet and end of packet.