2
votes

USB Full speed has a speed of 12 MBit/second = 1,5 MByte/s.

But within these 12 MBit also a lot of extra data is transmitted which is not payload, like token, endpoint address, CRC5, CRC16, Acknowledge, SOF + EOF packets, etc.. Additionally the bus manager reserves 10% of a frame for Control Transfers.

See Interrupt Transfer in USB Made Simple Part 3

When I have an USB endpoint in Interrupt mode with a polling interval of 1 ms then I can transmit 64 bytes per frame = 64kByte / second.

But what if I have 2 endpoints with 1 ms polling? Then the host will poll both endpoints within 1 ms so I have a total throughput of 128 kByte/s?

And when the host is polling 15 IN endpoints simulataneously that would result in 15 * 64 kByte = 960 kByte/s?

(Let's suppose for simplicity that there are no OUT transfers)

First question: Although searching a lot I could not find a website talking about the maximum effective payload throughput at Full Speed.

Second question: Full speed allows a maximum of 64 byte / packet and a minimum poll interval of 1 ms. If I want to transfer the maximum possible payload via IN transfer, should I use multiple endpoints and spread the data transmission over these endpoints? With how many endpoints do I get to the limit?

Third question: I see that in a Bulk transfer the host requests IN data more often than once per millisecond. Does this mean that Bulk is faster than Interrupt transfer?

2

2 Answers

1
votes

Third question: I see that in a Bulk transfer the host requests IN data more often than once per millisecond. Does this mean that Bulk is faster than Interrupt transfer?

A lot faster. You can reach about 1 MByte/sec with a single bulk endpoint - which is also the maximum throughput you can get for USB Full speed.

In a nutshell: If your application wants to tansfer data as fast as possible use bulk endpoints.

1
votes

I found a partial answer in the USB 2.0 specification at chapter 5.7.4 and 5.8.4:

The protocol overhead is 13 bytes for Bulk transfers: (3 SYNC bytes, 3 PID bytes, 2 Endpoint + CRC bytes, 2 CRC bytes, and a 3-byte interpacket delay) and 19 bytes for Interrupt transfers (5 SYNC bytes, 5 PID bytes, 2 Endpoint + CRC bytes, 2 CRC bytes, and a 5-byte interpacket delay)

If a data payload of 64 bytes is used the max bandwidth is 1.216.000 Bytes/s for Bulk transfers. This means that one frame of 1 ms can transfer 1216 bytes = 19 blocks of 64 byte.

Interrupt endpoints are polled at a maximum interval of once per millisecond, so the maximum payload will be 64kB/s or less.

But these values are theory. The document states that bit stuffing is ignored. Also the 10% bandwidth reserved for Control transfers is ignored here. And for Interrupt endpoints the maximum throughput will be 64 byte per millisecond = 64 kByte / second.

Another interesting article about the speed measured in the real life of different Full speed devices and different operating systems is very interesting because it differs extremely from the theoretical values especially for Windows.

Paul measured a maximum speed of 1 Megabyte/second, but in the OUT direction.

http://www.pjrc.com/teensy/benchmark_usb_serial_receive.html

and

https://www.pjrc.com/teensy/usb_serial.html