Analyzing and Graphically Explaining the USB Enumeration Process Using the HD-USB12 Protocol Analyzer

Publisher:自在自由Latest update time:2021-07-08 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

I spent 2300 silver dollars on a HD-USB12 protocol analyzer (painful…). But it is quite useful, and it will be much easier to do USB firmware development in the future.


Without further ado, let's first illustrate the USB enumeration process.


1. Reset the bus and send a GET_DESCRIPTOR command packet to the default address 0 to request a device description.

                                                               
1) Index [4 - 5]: indicates that the USB is plugged in and the bus is reset
2) Index [7 - 8]: indicates that the host sends a GET_DESCRIPTOR instruction packet to the default address, and the detailed information is also captured, as shown in (Figure 2):

3) Index[15 - 17]: indicates that the device sends the device description data to the host. Index[16]
4) Index[18 - 19]: indicates that after the host completes the GET_DESCRIPTOR command, it sends an empty response to the device.


2. Reset the bus again and send the SET_ADDRESS instruction packet to the device to set the device address.


1) Index [22 - 23]: Indicates that the bus is reset again. This reset is completed automatically, not manually plugging and unplugging the USB
. 2) Index [25 - 27]: Indicates that the host sends a SET_ADDRESS instruction packet to the default address. 


3) Index[29 - 31]: indicates that after the device completes the SET_ADDRESS command, it sends an empty response to the host;


3. Send a GET_DESCRIPTOR command packet to the device address set in the second step to request the device description.

1) Index[33 - 35]: indicates that the host sends a GET_DESCRIPTOR instruction packet to address 01.          

2) Index[41 - 43]: indicates that the device sends device description data to the host. Index[42]
3) Index[45 - 47]: indicates that the device sends device description data to the host. Index[46]
4) Index[48 - 50]: indicates that after the host completes the GET_DESCRIPTOR command, it sends an empty response to the device.


4. Send a GET_DESCRIPTOR command packet to the device address set in step 2 to request a configuration description.           

1) Index[52 - 54]: indicates that the host sends a GET_DESCRIPTOR instruction packet to address 01    


2) Index[57 - 59]: indicates that the device sends configuration description data to the host Index[58]
3) Index[60 - 62]: indicates that after the host completes the GET_DESCRIPTOR command, it sends an empty response to the device;


5. Repeat sending the GET_DESCRIPTOR command packet to the device address set in step 2 to obtain all device descriptions and configuration descriptions;


6. Send the SET_CONFIGURATION instruction packet to the device address set in the second step to set the configuration description.

1) Index[139 - 141]: indicates that the host sends a SET_CONFIGURATION instruction packet to address 01.


2) Index[143 - 145]: Indicates that after the device completes the SET_CONFIGURATION command, it sends an empty response to the host.


    At this point, the enumeration process is complete and the device can communicate with the host through the driver.


    The above USB enumeration process is captured based on the existing specific device, and does not completely involve all the instruction packets of the USB protocol, such as the GET_STATUS instruction packet, CLEAR_FEATURE instruction packet, SET_FEATURE instruction packet, SET_DESCRIPTOR instruction packet, GET_CONFIGURATION instruction packet, GET_INTERFACE instruction packet, SET_INTERFACE instruction packet, SYNCH_FRAME instruction packet, etc.


 (2) There is another good summary, which I will post here: http://blog.csdn.net/am_111/article/details/6061790


Reference address:Analyzing and Graphically Explaining the USB Enumeration Process Using the HD-USB12 Protocol Analyzer

Previous article:Network Analyzer
Next article:Calibration of Network Analyzers

Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号