Condividi tramite


USB Device ENUMERATION PROCESS

( Copy From Microchip AN1003)

The following summarizes the steps involved in theenumeration of a USB device and explains how thedevice goes from Powered to Default, Address and theConfigured state during the enumeration process.

1. User plugs a USB device into a USB port. The hub provides power to the port and the device isin the Powered state.

2. The hub detects the device.

3. The hub uses an interrupt pipe to report the event to the host.

4. Host sends Get_Port_Status request to obtain more information about the device.

5. Hub detects whether device is Low-Speed orFull-Speed operation and sends the information to the host in response to Get_Port_Status.

6. Host sends a Set_Port_Feature request, asking the hub to reset the port.

7. Hub resets the device.

8. Host learns if a Full-Speed device supports High-Speed operation (using Chirp K signal).

9. Host verifies if the device has exited the Reset state using Get_Port_Status.

10. At this point, the device is in the Default state(device is ready to respond to control transfersover the default pipe at Endpoint 0, default address is 00h and the device can draw up to100 mA from the bus).

11. Host sends Get_Descriptor to learn the maximum packet size (Note: eighth byte of the device descriptor is bMaxPacketSize).

12. The host assigns an address by sending a Set_Address request. Device is now in the Address state.
13. Host sends Get_Descriptor to learn more about the device. The host responds by sending the descriptor followed by all other subordinate descriptors.

14. Host assigns and loads a device driver.

15. Host’s device driver selects a configuration bysending a Set_Configuration request. The device is now in the Configured state.

16. Host assigns drivers for interfaces in composite devices.

17. If the hub detects an overcurrent, or if the host requests the hub to remove power, the device will be unpowered by the USB bus. In this case, the device and host cannot communicate and the device is in the Attached state.

18. If the device does not see any activity on the busfor 3 ms, it goes into the Suspend state. The device consumes minimal bus power in thisstate.