Chapter 1
24
$WU5RGGFUCPF&CVC6JTQWIJRWV
The data throughput, or rate of transfer of application data, between a device
and host is less than the bus speed and isn’t always predictable. Some of the
transmitted bits identify, synchronize, and error-check the data, and the
throughput also varies with the transfer type and how busy the bus is.
For time-sensitive data, USB supports transfer types that have a guaranteed rate
or guaranteed maximum latency. Isochronous transfers have a guaranteed rate,
where the host can request a specific number of bytes to transfer at defined
intervals. The intervals can be as short as 1 ms at full speed or 125
µs at high
speed and SuperSpeed. Isochronous transfers have no error correcting, however.
Interrupt transfers have error correcting and guaranteed maximum latency. The
device specifies a maximum interval, and when a driver has requested a data
transfer, the host allows no more than the specified interval, or maximum
latency, to elapse between transfer attempts. The requested maximum interval
can have a range of 10–255 ms at low speed, 1–255 ms at full speed, and 125
µs
to 4.096 s at high speed and SuperSpeed.
Because all devices share the bus, a device has no guarantee that a particular rate
or maximum latency will be available on attachment. If the bus is too busy to
allow a requested transfer rate or maximum latency, the host refuses to complete
the configuration process that enables the host to schedule transfers. The
device’s driver can then request a configuration or interface that requires less
bandwidth. To take full advantage of reserved bandwidth, the device driver and
application software and device firmware must eliminate retries as much as pos-
sible. The device should have data ready to send when the host requests it and
should be ready to accept data when the host sends it.
Of USB’s four transfer types, the fastest on an otherwise idle bus are bulk trans-
fers, with theoretical maximums of around 1.2 MB/s at full speed, 53 MB/s at
high speed, and 400 MB/s at SuperSpeed. Isochronous transfers can request the
most bandwidth (1.023 MB/s at full speed, 24.576 MB/s at high speed, and
393 MB/s at SuperSpeed). Low speed doesn’t support bulk or isochronous
transfers, and the maximum guaranteed bandwidth for a single low-speed trans-
fer is 800 bytes per second.
&GXGNQRKPIC&GXKEG
Designing a USB device for PCs involves both getting the device up and run-
ning and providing software to communicate with the device.