首页 > 代码库 > 试用bus hound来分析STM32CubeMX来生成USB_HID_Mouse工程

试用bus hound来分析STM32CubeMX来生成USB_HID_Mouse工程

 

技术分享
  1 Bus Hound 6.01 capture on Windows Vista Service Pack 1 (x64). Complements of www.perisoft.net
  2 
  3 STM32_HID_mouse
  4 
  5   Device - Device ID (followed by the endpoint for USB devices)
  6             (16) USB 2.0 集线器
  7             (19) USB 输入设备
  8             (21) HID-compliant device
  9             (23) USB 输入设备
 10   Address - FireWire async address or channel number
 11   Length - Total transfer length
 12   Phase  - Phase Type
 13             CTL   USB control transfer       
 14             IN    Data in transfer           
 15             IRP   I/O request packet         
 16             STAK  IRP stack location         
 17             URB   USB request block          
 18   Data   - Hex dump of the data transferred
 19   Descr  - Description of the phase
 20   Cmd... - Position in the captured data
 21 
 22 
 23 Device  Address              Length    Phase  Data                                                Description       Cmd.Phase.Ofs(rep)
 24 ------  -------------------  --------  -----  --------------------------------------------------  ----------------  ------------------
 25   16                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                           1.1.0        
 26                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                           1.1.16       
 27   16                                   STAK   16 02 00 e1  00 00 00 00  00 00 00 00  00 00 00 00  POWER                    1.2.0        
 28                                               01 00 00 00  00 00 00 00  01 00 00 00  00 00 00 00                           1.2.16       
 29   16                                   IRP    06 00 38 02  00 00 00 00  00 00 00 00  00 00 00 00                           2.1.0        
 30                                               00 00 06 00  00 00 00 00  00 00 00 00  00 00 00 00                           2.1.16       
 31   16                                   STAK   0f 00 00 00  00 00 00 00  e8 1e 18 09  80 fa ff ff  INTERNAL IOCTL           2.2.0        
 32                                               00 00 00 00  00 00 00 00  0f 20 22 00  00 00 00 00                           2.2.16       
 33   16.0                                 CTL    a3 00 00 00  01 00 04 00                            GET STATUS               3.1.0        
 34   16.0                              4  IN     01 01 01 00                                         ....                     3.2.0        
 35   16.0                                 URB    88 00 08 00  00 00 00 00  10 70 1b 09  80 fa ff ff  CONTROL TRANSFER         3.3.0        
 36                                               10 00 00 00  00 00 00 00  68 70 1b 09  80 fa ff ff                           3.3.16       
 37   16                                   IRP    06 00 38 02  00 00 00 00  00 00 00 00  00 00 00 00                           3.4.0        
 38                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                           3.4.16       
 39   16                                   STAK   0f 00 00 e0  00 00 00 00  64 cb 65 0b  80 fa ff ff  SUBMIT_URB               3.5.0        
 40                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                           3.5.16       
 41   16.0                                 CTL    23 03 04 00  01 00 00 00                            SET FEATURE              4.1.0        
 42   16.0                                 URB    88 00 08 00  00 00 00 00  10 70 1b 09  80 fa ff ff  CONTROL TRANSFER         4.2.0        
 43                                               10 00 00 00  00 00 00 00  68 70 1b 09  80 fa ff ff                           4.2.16       
 44   16                                   IRP    06 00 38 02  00 00 00 00  00 00 00 00  00 00 00 00                           4.3.0        
 45                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                           4.3.16       
 46   16                                   STAK   0f 00 00 e0  00 00 00 00  60 cb 65 0b  80 fa ff ff  SUBMIT_URB               4.4.0        
 47                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                           4.4.16       
 48   16.1                              1  IN     02                                                  .                        5.1.0        
 49   16.1                                 URB    80 00 09 00  00 00 00 00  10 70 1b 09  80 fa ff ff  BULK/INT XFER            5.2.0        
 50                                               10 00 00 00  00 00 00 00  20 13 18 09  80 fa ff ff                           5.2.16       
 51   16                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                           5.3.0        
 52                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                           5.3.16       
 53   16                                   STAK   0f 00 00 e0  00 00 00 00  10 80 1a 09  80 fa ff ff  SUBMIT_URB               5.4.0        
 54                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                           5.4.16       
 55   16.0                                 CTL    a3 00 00 00  01 00 04 00                            GET STATUS               6.1.0        
 56   16.0                              4  IN     11 01 01 00                                         ....                     6.2.0        
 57   16.0                                 URB    88 00 08 00  00 00 00 00  10 70 1b 09  80 fa ff ff  CONTROL TRANSFER         6.3.0        
 58                                               10 00 00 00  00 00 00 00  68 70 1b 09  80 fa ff ff                           6.3.16       
 59   16                                   IRP    06 00 38 02  00 00 00 00  00 00 00 00  00 00 00 00                           6.4.0        
 60                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                           6.4.16       
 61   16                                   STAK   0f 00 00 e0  00 00 00 00  64 cb 65 0b  80 fa ff ff  SUBMIT_URB               6.5.0        
 62                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                           6.5.16       
 63   16.0                                 CTL    23 01 10 00  01 00 00 00                            CLEAR FEATURE            7.1.0        
 64   16.0                                 URB    88 00 08 00  00 00 00 00  10 70 1b 09  80 fa ff ff  CONTROL TRANSFER         7.2.0        
 65                                               10 00 00 00  00 00 00 00  68 70 1b 09  80 fa ff ff                           7.2.16       
 66   16                                   IRP    06 00 38 02  00 00 00 00  00 00 00 00  00 00 00 00                           7.3.0        
 67                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                           7.3.16       
 68   16                                   STAK   0f 00 00 e0  00 00 00 00  60 cb 65 0b  80 fa ff ff  SUBMIT_URB               7.4.0        
 69                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                           7.4.16       
 70   16.1                              1  IN     02                                                  .                        8.1.0        
 71   16.1                                 URB    80 00 09 00  00 00 00 00  10 70 1b 09  80 fa ff ff  BULK/INT XFER            8.2.0        
 72                                               10 00 00 00  00 00 00 00  20 13 18 09  80 fa ff ff                           8.2.16       
 73   16                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                           8.3.0        
 74                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                           8.3.16       
 75   16                                   STAK   0f 00 00 e0  00 00 00 00  10 80 1a 09  80 fa ff ff  SUBMIT_URB               8.4.0        
 76                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                           8.4.16       
 77   16.0                                 CTL    a3 00 00 00  01 00 04 00                            GET STATUS               9.1.0        
 78   16.0                              4  IN     03 01 10 00                                         ....                     9.2.0        
 79   16.0                                 URB    88 00 08 00  00 00 00 00  10 70 1b 09  80 fa ff ff  CONTROL TRANSFER         9.3.0        
 80                                               10 00 00 00  00 00 00 00  68 70 1b 09  80 fa ff ff                           9.3.16       
 81   16                                   IRP    06 00 38 02  00 00 00 00  00 00 00 00  00 00 00 00                           9.4.0        
 82                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                           9.4.16       
 83   16                                   STAK   0f 00 00 e0  00 00 00 00  74 12 71 0a  80 fa ff ff  SUBMIT_URB               9.5.0        
 84                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                           9.5.16       
 85   16.0                                 CTL    23 01 14 00  01 00 00 00                            CLEAR FEATURE           10.1.0        
 86   16.0                                 URB    88 00 08 00  00 00 00 00  10 70 1b 09  80 fa ff ff  CONTROL TRANSFER        10.2.0        
 87                                               10 00 00 00  00 00 00 00  68 70 1b 09  80 fa ff ff                          10.2.16       
 88   16                                   IRP    06 00 38 02  00 00 00 00  00 00 00 00  00 00 00 00                          10.3.0        
 89                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          10.3.16       
 90   16                                   STAK   0f 00 00 e0  00 00 00 00  70 12 71 0a  80 fa ff ff  SUBMIT_URB              10.4.0        
 91                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                          10.4.16       
 92   16.0                                 CTL    23 03 04 00  01 00 00 00                            SET FEATURE             11.1.0        
 93   16.0                                 URB    88 00 08 00  00 00 00 00  10 70 1b 09  80 fa ff ff  CONTROL TRANSFER        11.2.0        
 94                                               10 00 00 00  00 00 00 00  68 70 1b 09  80 fa ff ff                          11.2.16       
 95   16                                   IRP    06 00 38 02  00 00 00 00  00 00 00 00  00 00 00 00                          11.3.0        
 96                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          11.3.16       
 97   16                                   STAK   0f 00 00 e0  00 00 00 00  70 12 71 0a  80 fa ff ff  SUBMIT_URB              11.4.0        
 98                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                          11.4.16       
 99   16.1                              1  IN     02                                                  .                       12.1.0        
100   16.1                                 URB    80 00 09 00  00 00 00 00  10 70 1b 09  80 fa ff ff  BULK/INT XFER           12.2.0        
101                                               10 00 00 00  00 00 00 00  20 13 18 09  80 fa ff ff                          12.2.16       
102   16                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          12.3.0        
103                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          12.3.16       
104   16                                   STAK   0f 00 00 e0  00 00 00 00  10 80 1a 09  80 fa ff ff  SUBMIT_URB              12.4.0        
105                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                          12.4.16       
106   16.0                                 CTL    a3 00 00 00  01 00 04 00                            GET STATUS              13.1.0        
107   16.0                              4  IN     03 01 10 00                                         ....                    13.2.0        
108   16.0                                 URB    88 00 08 00  00 00 00 00  10 70 1b 09  80 fa ff ff  CONTROL TRANSFER        13.3.0        
109                                               10 00 00 00  00 00 00 00  68 70 1b 09  80 fa ff ff                          13.3.16       
110   16                                   IRP    06 00 38 02  00 00 00 00  00 00 00 00  00 00 00 00                          13.4.0        
111                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          13.4.16       
112   16                                   STAK   0f 00 00 e0  00 00 00 00  34 99 00 0b  80 fa ff ff  SUBMIT_URB              13.5.0        
113                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                          13.5.16       
114   16.0                                 CTL    23 01 14 00  01 00 00 00                            CLEAR FEATURE           14.1.0        
115   16.0                                 URB    88 00 08 00  00 00 00 00  10 70 1b 09  80 fa ff ff  CONTROL TRANSFER        14.2.0        
116                                               10 00 00 00  00 00 00 00  68 70 1b 09  80 fa ff ff                          14.2.16       
117   16                                   IRP    06 00 38 02  00 00 00 00  00 00 00 00  00 00 00 00                          14.3.0        
118                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          14.3.16       
119   16                                   STAK   0f 00 00 e0  00 00 00 00  30 99 00 0b  80 fa ff ff  SUBMIT_URB              14.4.0        
120                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                          14.4.16       
121   16.0                                 CTL    a3 00 00 00  02 00 04 00                            GET STATUS              15.1.0        
122   16.0                              4  IN     00 01 00 00                                         ....                    15.2.0        
123   16.0                                 URB    88 00 08 00  00 00 00 00  10 70 1b 09  80 fa ff ff  CONTROL TRANSFER        15.3.0        
124                                               10 00 00 00  00 00 00 00  68 70 1b 09  80 fa ff ff                          15.3.16       
125   16                                   IRP    06 00 38 02  00 00 00 00  00 00 00 00  00 00 00 00                          15.4.0        
126                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          15.4.16       
127   16                                   STAK   0f 00 00 e0  00 00 00 00  e4 17 67 0b  80 fa ff ff  SUBMIT_URB              15.5.0        
128                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                          15.5.16       
129   16.0                                 CTL    a3 00 00 00  03 00 04 00                            GET STATUS              16.1.0        
130   16.0                              4  IN     00 01 00 00                                         ....                    16.2.0        
131   16.0                                 URB    88 00 08 00  00 00 00 00  10 70 1b 09  80 fa ff ff  CONTROL TRANSFER        16.3.0        
132                                               10 00 00 00  00 00 00 00  68 70 1b 09  80 fa ff ff                          16.3.16       
133   16                                   IRP    06 00 38 02  00 00 00 00  00 00 00 00  00 00 00 00                          16.4.0        
134                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          16.4.16       
135   16                                   STAK   0f 00 00 e0  00 00 00 00  e4 17 67 0b  80 fa ff ff  SUBMIT_URB              16.5.0        
136                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                          16.5.16       
137   16.0                                 CTL    a3 00 00 00  04 00 04 00                            GET STATUS              17.1.0        
138   16.0                              4  IN     00 01 00 00                                         ....                    17.2.0        
139   16.0                                 URB    88 00 08 00  00 00 00 00  10 70 1b 09  80 fa ff ff  CONTROL TRANSFER        17.3.0        
140                                               10 00 00 00  00 00 00 00  68 70 1b 09  80 fa ff ff                          17.3.16       
141   16                                   IRP    06 00 38 02  00 00 00 00  00 00 00 00  00 00 00 00                          17.4.0        
142                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          17.4.16       
143   16                                   STAK   0f 00 00 e0  00 00 00 00  e4 17 67 0b  80 fa ff ff  SUBMIT_URB              17.5.0        
144                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                          17.5.16       
145   16.0                                 CTL    a3 00 00 00  01 00 04 00                            GET STATUS              18.1.0        
146   16                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          19.1.0        
147                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          19.1.16       
148   16                                   STAK   1b 07 00 e0  00 00 00 00  00 00 00 00  00 00 00 00  QUERY RELATIONS         19.2.0        
149                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          19.2.16       
150   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          20.1.0        
151                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          20.1.16       
152   23                                   STAK   1b 13 00 00  00 00 00 00  00 00 00 00  00 00 00 00  QUERY ID                20.2.0        
153                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          20.2.16       
154   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          21.1.0        
155                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          21.1.16       
156   23                                   STAK   1b 09 00 00  00 00 00 00  80 27 7d 04  80 f8 ff ff  QUERY CAPS              21.2.0        
157                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          21.2.16       
158   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          22.1.0        
159                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          22.1.16       
160   23                                   STAK   1b 0c 00 00  00 00 00 00  00 00 00 00  00 00 00 00  QUERY DEV TEXT          22.2.0        
161                                               04 08 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          22.2.16       
162   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          23.1.0        
163                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          23.1.16       
164   23                                   STAK   1b 0c 00 00  00 00 00 00  01 00 00 00  00 00 00 00  QUERY DEV TEXT          23.2.0        
165                                               04 08 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          23.2.16       
166   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          24.1.0        
167                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          24.1.16       
168   23                                   STAK   1b 13 00 00  00 00 00 00  03 00 00 00  00 00 00 00  QUERY ID                24.2.0        
169                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          24.2.16       
170   16.0                              4  IN     03 01 00 00                                         ....                    18.2.0        
171   16.0                                 URB    88 00 08 00  00 00 00 00  10 70 1b 09  80 fa ff ff  CONTROL TRANSFER        18.3.0        
172                                               10 00 00 00  00 00 00 00  68 70 1b 09  80 fa ff ff                          18.3.16       
173   16                                   IRP    06 00 38 02  00 00 00 00  00 00 00 00  00 00 00 00                          18.4.0        
174                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          18.4.16       
175   16                                   STAK   0f 00 00 e0  00 00 00 00  44 37 e7 0a  80 fa ff ff  SUBMIT_URB              18.5.0        
176                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                          18.5.16       
177   16.0                                 CTL    a3 00 00 00  02 00 04 00                            GET STATUS              25.1.0        
178   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          26.1.0        
179                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          26.1.16       
180   23                                   STAK   1b 13 00 00  00 00 00 00  01 00 00 00  00 00 00 00  QUERY ID                26.2.0        
181                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          26.2.16       
182   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          27.1.0        
183                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          27.1.16       
184   23                                   STAK   1b 13 00 00  00 00 00 00  02 00 00 00  00 00 00 00  QUERY ID                27.2.0        
185                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          27.2.16       
186   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          28.1.0        
187                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          28.1.16       
188   23                                   STAK   1b 13 00 00  00 00 00 00  05 00 00 00  00 00 00 00  QUERY ID                28.2.0        
189                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          28.2.16       
190   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          29.1.0        
191                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          29.1.16       
192   23                                   STAK   1b 0b 00 00  00 00 00 00  00 00 00 00  00 00 00 00  QUERY RES REQ           29.2.0        
193                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          29.2.16       
194   16.0                              4  IN     00 01 00 00                                         ....                    25.2.0        
195   16.0                                 URB    88 00 08 00  00 00 00 00  10 70 1b 09  80 fa ff ff  CONTROL TRANSFER        25.3.0        
196                                               10 00 00 00  00 00 00 00  68 70 1b 09  80 fa ff ff                          25.3.16       
197   16                                   IRP    06 00 38 02  00 00 00 00  00 00 00 00  00 00 00 00                          25.4.0        
198                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          25.4.16       
199   16                                   STAK   0f 00 00 e0  00 00 00 00  44 37 e7 0a  80 fa ff ff  SUBMIT_URB              25.5.0        
200                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                          25.5.16       
201   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          30.1.0        
202                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          30.1.16       
203   23                                   STAK   1b 15 00 00  00 00 00 00  00 00 00 00  00 00 00 00  QUERY BUS INFO          30.2.0        
204                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          30.2.16       
205   16.0                                 CTL    a3 00 00 00  03 00 04 00                            GET STATUS              31.1.0        
206   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          32.1.0        
207                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          32.1.16       
208   23                                   STAK   1b 0a 00 00  00 00 00 00  00 00 00 00  00 00 00 00  QUERY RESOURCES         32.2.0        
209                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          32.2.16       
210   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          33.1.0        
211                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          33.1.16       
212   23                                   STAK   1b 19 00 00  00 00 00 00  00 00 00 00  00 00 00 00  PNP                     33.2.0        
213                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          33.2.16       
214   16.0                              4  IN     00 01 00 00                                         ....                    31.2.0        
215   16.0                                 URB    88 00 08 00  00 00 00 00  10 70 1b 09  80 fa ff ff  CONTROL TRANSFER        31.3.0        
216                                               10 00 00 00  00 00 00 00  68 70 1b 09  80 fa ff ff                          31.3.16       
217   16                                   IRP    06 00 38 02  00 00 00 00  00 00 00 00  00 00 00 00                          31.4.0        
218                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          31.4.16       
219   16                                   STAK   0f 00 00 e0  00 00 00 00  44 37 e7 0a  80 fa ff ff  SUBMIT_URB              31.5.0        
220                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                          31.5.16       
221   16.0                                 CTL    a3 00 00 00  04 00 04 00                            GET STATUS              34.1.0        
222   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          35.1.0(2)     
223                                               00 00 06 00  00 00 00 00  00 00 00 00  00 00 00 00                          35.1.16       
224   23                                   STAK   1b 13 00 00  00 00 00 00  00 00 00 00  00 00 00 00  QUERY ID                35.2.0        
225                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          35.2.16       
226   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          37.1.0        
227                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          37.1.16       
228   23                                   STAK   1b 18 00 e0  00 00 00 00  00 00 00 00  00 00 00 00  QUERY LEGACY            37.2.0        
229                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          37.2.16       
230   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          38.1.0        
231                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          38.1.16       
232   23                                   STAK   1b 0b 00 e0  00 00 00 00  00 00 00 00  00 00 00 00  QUERY RES REQ           38.2.0        
233                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          38.2.16       
234   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          39.1.0        
235                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          39.1.16       
236   23                                   STAK   1b 0d 00 e0  00 00 00 00  00 00 00 00  00 00 00 00  FILTER RES REQ          39.2.0        
237                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          39.2.16       
238   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          40.1.0        
239                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          40.1.16       
240   23                                   STAK   1b 09 00 e0  00 00 00 00  80 4d 8b 0b  80 fa ff ff  QUERY CAPS              40.2.0        
241                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          40.2.16       
242   16.0                              4  IN     00 01 00 00                                         ....                    34.2.0        
243   16.0                                 URB    88 00 08 00  00 00 00 00  10 70 1b 09  80 fa ff ff  CONTROL TRANSFER        34.3.0        
244                                               10 00 00 00  00 00 00 00  68 70 1b 09  80 fa ff ff                          34.3.16       
245   16                                   IRP    06 00 38 02  00 00 00 00  00 00 00 00  00 00 00 00                          34.4.0        
246                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          34.4.16       
247   16                                   STAK   0f 00 00 e0  00 00 00 00  44 37 e7 0a  80 fa ff ff  SUBMIT_URB              34.5.0        
248                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                          34.5.16       
249   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          41.1.0        
250                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          41.1.16       
251   23                                   STAK   1b 00 00 e0  00 00 00 00  00 00 00 00  00 00 00 00  START DEVICE            41.2.0        
252                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          41.2.16       
253   23.0                                 CTL    80 06 00 01  00 00 12 00                            GET DESCRIPTOR          42.1.0        
254   23.0                             18  IN     12 01 00 02  00 00 00 40  83 04 2b 57  00 02 01 02  .......@..+W....        42.2.0        
255                                               03 01                                               ..                      42.2.16       
256   23.0                                 URB    88 00 08 00  00 00 00 00  50 23 73 0b  80 fa ff ff  CONTROL TRANSFER        42.3.0        
257                                               10 00 00 00  00 00 00 00  a8 23 73 0b  80 fa ff ff                          42.3.16       
258   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          42.4.0        
259                                               00 00 06 00  00 00 00 00  00 00 00 00  00 00 00 00                          42.4.16       
260   23                                   STAK   0f 00 00 e0  00 00 00 00  40 37 e7 0a  80 fa ff ff  SUBMIT_URB              42.5.0        
261                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                          42.5.16       
262   23.0                                 CTL    80 06 00 02  00 00 09 00                            GET DESCRIPTOR          43.1.0        
263   23.0                              9  IN     09 02 22 00  01 01 00 e0  32                        ..".....2               43.2.0        
264   23.0                                 URB    88 00 08 00  00 00 00 00  50 23 73 0b  80 fa ff ff  CONTROL TRANSFER        43.3.0        
265                                               10 00 00 00  00 00 00 00  a8 23 73 0b  80 fa ff ff                          43.3.16       
266   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          43.4.0        
267                                               00 00 06 00  00 00 00 00  00 00 00 00  00 00 00 00                          43.4.16       
268   23                                   STAK   0f 00 00 e0  00 00 00 00  40 37 e7 0a  80 fa ff ff  SUBMIT_URB              43.5.0        
269                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                          43.5.16       
270   23.0                                 CTL    80 06 00 02  00 00 22 00                            GET DESCRIPTOR          44.1.0        
271   23.0                             34  IN     09 02 22 00  01 01 00 e0  32 09 04 00  00 01 03 01  ..".....2.......        44.2.0        
272                                               02 00 09 21  11 01 00 01  22 4a 00 07  05 81 03 04  ...!...."J......        44.2.16       
273   23.0                                 URB    88 00 08 00  00 00 00 00  50 23 73 0b  80 fa ff ff  CONTROL TRANSFER        44.3.0        
274                                               10 00 00 00  00 00 00 00  a8 23 73 0b  80 fa ff ff                          44.3.16       
275   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          44.4.0        
276                                               00 00 06 00  00 00 00 00  00 00 00 00  00 00 00 00                          44.4.16       
277   23                                   STAK   0f 00 00 e0  00 00 00 00  40 37 e7 0a  80 fa ff ff  SUBMIT_URB              44.5.0        
278                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                          44.5.16       
279   23.0                                 CTL    00 09 01 00  00 00 00 00                            SET CONFIG              45.1.0        
280   23.0                                 URB    58 00 00 00  00 00 00 00  50 23 73 0b  80 fa ff ff  SELECT CONFIG           45.2.0        
281                                               00 00 00 00  00 00 00 00  b0 dd 5a 0b  80 fa ff ff                          45.2.16       
282   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          45.3.0        
283                                               00 00 06 00  00 00 00 00  00 00 00 00  00 00 00 00                          45.3.16       
284   23                                   STAK   0f 00 00 e0  00 00 00 00  70 f5 49 0b  80 fa ff ff  SUBMIT_URB              45.4.0        
285                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                          45.4.16       
286   23.0                                 CTL    21 0a 00 00  00 00 00 00                            SET IDLE                46.1.0        
287   23.0                                 URB    88 00 08 00  00 00 00 00  50 23 73 0b  80 fa ff ff  CONTROL TRANSFER        46.2.0        
288                                               10 00 00 00  00 00 00 00  a8 23 73 0b  80 fa ff ff                          46.2.16       
289   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          46.3.0        
290                                               00 00 06 00  00 00 00 00  00 00 00 00  00 00 00 00                          46.3.16       
291   23                                   STAK   0f 00 00 e0  00 00 00 00  e0 17 67 0b  80 fa ff ff  SUBMIT_URB              46.4.0        
292                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                          46.4.16       
293   23.0                                 CTL    81 06 00 22  00 00 8a 00                            GET DESCRIPTOR          47.1.0        
294   23.0                             74  IN     05 01 09 02  a1 01 09 01  a1 00 05 09  19 01 29 03  ..............).        47.2.0        
295                                               15 00 25 01  95 03 75 01  81 02 95 01  75 05 81 01  ..%...u.....u...        47.2.16       
296   23.0                                 URB    88 00 08 00  00 00 00 00  50 23 73 0b  80 fa ff ff  CONTROL TRANSFER        47.3.0        
297                                               10 00 00 00  00 00 00 00  a8 23 73 0b  80 fa ff ff                          47.3.16       
298   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          47.4.0        
299                                               00 00 06 00  00 00 00 00  00 00 00 00  00 00 00 00                          47.4.16       
300   23                                   STAK   0f 00 00 e0  00 00 00 00  e0 17 67 0b  80 fa ff ff  SUBMIT_URB              47.5.0        
301                                               00 00 00 00  00 00 00 00  03 00 22 00  00 00 00 00                          47.5.16       
302   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          48.1.0        
303                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          48.1.16       
304   23                                   STAK   1b 09 00 e0  00 00 00 00  d0 26 7d 04  80 f8 ff ff  QUERY CAPS              48.2.0        
305                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          48.2.16       
306   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          49.1.0        
307                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          49.1.16       
308   23                                   STAK   1b 14 00 e0  00 00 00 00  00 00 00 00  00 00 00 00  QUERY DEV STATE         49.2.0        
309                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          49.2.16       
310   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          50.1.0        
311                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          50.1.16       
312   23                                   STAK   1b 07 00 e0  00 00 00 00  00 00 00 00  00 00 00 00  QUERY RELATIONS         50.2.0        
313                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          50.2.16       
314   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          51.1.0        
315                                               00 00 06 00  00 00 00 00  00 00 00 00  00 00 00 00                          51.1.16       
316   23                                   STAK   1b 13 00 e0  00 00 00 00  01 00 00 00  00 00 00 00  QUERY ID                51.2.0        
317                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          51.2.16       
318   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          52.1.0        
319                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          52.1.16       
320   23                                   STAK   1b 13 00 e0  00 00 00 00  00 00 00 00  00 00 00 00  QUERY ID                52.2.0        
321                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          52.2.16       
322   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          53.1.0        
323                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          53.1.16       
324   23                                   STAK   1b 13 00 e0  00 00 00 00  01 00 00 00  00 00 00 00  QUERY ID                53.2.0        
325                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          53.2.16       
326   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          54.1.0(2)     
327                                               00 00 06 00  00 00 00 00  00 00 00 00  00 00 00 00                          54.1.16       
328   23                                   STAK   1b 13 00 e0  00 00 00 00  00 00 00 00  00 00 00 00  QUERY ID                54.2.0        
329                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          54.2.16       
330   16                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          56.1.0        
331                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          56.1.16       
332   16                                   STAK   1b 07 00 e0  00 00 00 00  00 00 00 00  00 00 00 00  QUERY RELATIONS         56.2.0        
333                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          56.2.16       
334   23                                   IRP    06 00 a0 03  00 00 00 00  00 00 00 00  00 00 00 00                          57.1.0        
335                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          57.1.16       
336   23                                   STAK   1b 07 00 e0  00 00 00 00  00 00 00 00  00 00 00 00  QUERY RELATIONS         57.2.0        
337                                               00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00                          57.2.16       
View Code

 对253~255行的分析


截取上面原始数据如下:

253   23.0                                 CTL    80 06 00 01  00 00 12 00                            GET DESCRIPTOR          42.1.0        
254   23.0                             18  IN     12 01 00 02  00 00 00 40  83 04 2b 57  00 02 01 02  .......@..+W....        42.2.0        
255                                               03 01 

开始分析:
Setup Data:  80 06 00 01 00 00 12 00 
------------------------------------
 Direction:  Device-to-host
      Type:  Standard
 Recipient:  Device
------------------------------------
  bRequest:  GET_DESCRIPTOR

    wValue:  DEVICE type

    wIndex:  0x0000

   wLength:  18

Data stage (18 bytes) :  12 01 00 02 00 00 00 40 83 04 2b 57 00 02 01 02 03 01 
------------------------------------

       DEVICE Descriptor
       -----------------
Offset|       Field        | Value |  Description  
------|--------------------|-------|--------------------
  0   |      bLength       |  0x12 |The size of this  
      |                    |       |descriptor is 18 bytes
------|--------------------|-------|--------------------
  1   |  bDescriptorType   |  0x01 |DEVICE Descriptor Type
------|--------------------|-------|--------------------
  2   |       bcdUSB       | 0x0200|Device compliant to 
      |                    |       |the USB 
      |                    |       |specification 
      |                    |       |version 2.00   
------|--------------------|-------|--------------------
  4   |    bDeviceClass    |  0x00 |Each interface 
      |                    |       |specifies its own 
      |                    |       |class information
------|--------------------|-------|--------------------
  5   |  bDeviceSubClass   |  0x00 |Each interface 
      |                    |       |specifies its own 
      |                    |       |subclass information
------|--------------------|-------|--------------------
  6   |  bDeviceProtocol   |  0x00 |No protocols on the   
      |                    |       |device basis
------|--------------------|-------|--------------------
  7   |  bMaxPacketSize0   |  0x40 |Maximum packet size    
      |                    |       |for endpoint zero is 64
------|--------------------|-------|--------------------
  8   |      idVendor      | 0x0483|Vendor ID   
      |                    |       |
------|--------------------|-------|--------------------
  10  |     idProduct      | 0x572B|The Product ID 
------|--------------------|-------|--------------------
  12  |     bcdDevice      | 0x0200|The device release 
      |                    |       |number is 02.00
------|--------------------|-------|--------------------
  14  |   iManufacturer    |  0x01 |The index of the 
      |                    |       |string descriptor 
      |                    |       |describing the 
      |                    |       |manufacturer is 1
------|--------------------|-------|--------------------
  15  |      iProduct      |  0x02 |The index of the 
      |                    |       |string descriptor 
      |                    |       |describing the 
      |                    |       |product is 2
------|--------------------|-------|--------------------
  16  |   iSerialNumber    |  0x03 |The device doesnt 
      |                    |       |have the string 
      |                    |       |descriptor 
      |                    |       |describing the 
      |                    |       |serial number
------|--------------------|-------|--------------------
  17  | bNumConfigurations |  0x01 |The device has 1 
      |                    |       |possible configurations
------|--------------------|-------|--------------------
 

对262~263行的分析

262     23.0                                 CTL    80 06 00 02  00 00 09 00                            GET DESCRIPTOR          43.1.0        
263   23.0                              9  IN     09 02 22 00  01 01 00 e0  32                        ..".....2               43.2.0  
开始分析:

Setup Data:  80 06 00 02 00 00 09 00
------------------------------------
 Direction:  Device-to-host
      Type:  Standard
 Recipient:  Device
------------------------------------
  bRequest:  GET_DESCRIPTOR

    wValue:  CONFIG type, Index 0

    wIndex:  0x0000

   wLength:  9
Data stage (9 bytes) : 09 02 22 00  01 01 00 e0  32
------------------------------------

       CONFIGURATION Descriptor
       ------------------------
Offset|        Field        | Value |  Description  
------|---------------------|-------|--------------------
  0   |       bLength       |  0x09 |The size of this
      |                     |       |descriptor is 9 bytes
------|---------------------|-------|--------------------
  1   |   bDescriptorType   |  0x02 |CONFIGURATION
      |                     |       |Descriptor Type
------|---------------------|-------|--------------------
  2   |    wTotalLength     | 0x0022|The total length of
      |                     |       |data for this
      |                     |       |configuration is 34.
      |                     |       |This includes the
      |                     |       |combined length of
      |                     |       |all the descriptors returned
------|---------------------|-------|--------------------
  4   |   bNumInterfaces    |  0x01 |This configuration
      |                     |       |supports 1 interfaces
------|---------------------|-------|--------------------
  5   | bConfigurationValue |  0x01 |The value 1 should
      |                     |       |be used to select
      |                     |       |this configuration
------|---------------------|-------|--------------------
  6   |   iConfiguration    |  0x00 |The device doesn‘t
      |                     |       |have the string
      |                     |       |descriptor
      |                     |       |describing this configuration
------|---------------------|-------|--------------------
  7   |    bmAttributes     |  0xE0 |Configuration characteristics :
      |                     |       |Bit 7: Reserved (set to one) 1
      |                     |       |Bit 6: Self-powered          1
      |                     |       |Bit 5: Remote Wakeup         1
------|---------------------|-------|--------------------
  8   |      MaxPower       |  0x32 |Maximum power
      |                     |       |consumption of the
      |                     |       |device in this
      |                     |       |configuration is 100 mA
------|---------------------|-------|--------------------
 

试用bus hound来分析STM32CubeMX来生成USB_HID_Mouse工程