Chapter 4 Software Development
|
| standard device requests, and standard device |
|
| descriptors |
Chapter 10 | USB Host: Hardware | Functions and operation of host hardware and |
| and Software | software |
Chapter 11 | Hub Specification | Hub port operation, requests, and descriptors |
Chapter 4 provides a firm grounding in the USB core specifications. All developers of USB equipment must study Chapter 5 very carefully. Hardware developers must read Chapter 7; firmware developers, Chapters 8 and 9. Firmware developers must pay particular attention to the timing specifications in Chapter 7.
What follows are key points from the core specifications. For complete details, refer to the specifications available from the USB Implementers Forum web site.
4-1-4. Data Flow Types
The USB specifications define four data flow types with the following characteristics. Flexibly combining these four data flow types provides solutions to the communications needs of a wide variety of applications.
Table 4.1.2. USB Data Flow Types
Control | Communication of commands and responses for device configuration and pipe | |
| control | |
Bulk | Transfer of relatively large, bursty data volumes with wide dynamic latitude in | |
| transmission constraints | |
Interrupt | Transfer of small data volumes within time limits based on | |
| or feedback response characteristics | |
Isochronous | Transfer using prenegotiated USB bandwidth with a prenegotiated delivery | |
| audio data, for | |
|
|
|
4-1-5. Bus Transactions
Data transfers consist of bus transactions, exchanges of basic packets between the host and a specific device. The example below shows two such transactions.
The first data request (IN) from the host arrives when the device has no data for delivery, so the latter returns a NAK handshake, completing the transaction. The NAK indicates two things: that the device has no data ready and that the host should resend the request later.
The second data request (IN), in contrast, causes the device to deliver the data (DATA0) that it has ready. The host acknowledges successful receipt of this data with an ACK, completing the transaction.
Transactions require cirtain bit time order response, so are implemented in hardware.
Host
(1)Data request (IN)
(3)Data request (IN)
(5)Successful receipt acknowledgment (ACK)
→
←
→
←
→
Device
(2) No data (NAK)
(4) Data transfer (DATA0)
page