...
An interface requires a set of endpoints to communicate with the host. Each interface has different requirements in terms of the number of endpoints, transfer type, direction, maximum packet size, and maximum polling interval. The device sends an endpoint descriptor to notify the host about endpoint capabilities.
shows Figure - USB Device Structure shows the hierarchical organization of a USB device. Configurations are grouped based on the device’s speed. A high-speed device might have a particular configuration in both high-speed and low/full speed.
Anchor |
---|
| Figure - USB Device Structure |
---|
| Figure - USB Device Structure |
---|
|
Panel |
---|
borderWidth | 0 |
---|
title | Figure - USB Device Structure |
---|
|
Image Added |
Device States
The USB 2.0 specification defines six different states and are listed in Table - USB Device States.
Anchor |
---|
| Table - USB Device States |
---|
| Table - USB Device States |
---|
|
Panel |
---|
borderWidth | 0 |
---|
title | Table - USB Device States |
---|
|
Device States | Description |
---|
Attached | The device is in the Attached state when it is connected to the host or a hub port. The hub must be connected to the host or to another hub. | Powered | A device is considered in the Powered state when it starts consuming power from the bus. Only bus-powered devices use power from the host. Self-powered devices are in the Powered state after port attachment. | Default | After the device has been powered, it should not respond to any request or transactions until it receives a reset signal from the host. The device enters in the Default state when it receives a reset signal from the host. In the Default state, the device responds to standard requests at the default address 0. | Address | During enumeration, the host assigns a unique address to the device. When this occurs, the device moves from the Default state to the Address state. | Configured | After the host assigns an address to the device, the host must select a configuration. After the host selects a configuration, the device enters the Configured state. In this state, the device is ready to communicate with the host applications. | Suspended | The device enters into Suspended state when no traffic has been seen over the bus for a specific period of time. The device retains the address assigned by the host in the Suspended state. The device returns to the previous state after traffic is present in the bus. |
|
Enumeration
Enumeration is the process where the host configures the device and learns about the device’s capabilities. The host starts enumeration after the device is attached to one of the root or external hub ports. The host learns about the device’s manufacturer, vendor/product IDs and release versions by sending a Get Descriptor request to obtain the device descriptor and the maximum packet size of the default pipe (control endpoint 0). Once that is done, the host assigns a unique address to the device which will tell the device to only answer requests at this unique address. Next, the host gets the capabilities of the device by a series of Get Descriptor requests. The host iterates through all the available configurations to retrieve information about number of interfaces in each configuration, interfaces classes, and endpoint parameters for each interface and will lastly finish the enumeration process by selecting the most suitable configuration.
...