ST Cube生成的msc的代码移植到GDF407芯片上,USB枚举异常,设备上电后第一次成功,能识别到U盘符; 第二次可以到USB大容量存储设备,但是到不了显示盘符,过一段时间显示感叹号; 没有大神移植过给点参考建议!
usb hound抓包(这部分和正常识别的一致)
Device Length Phase Data Description
------ -------- ----- -------------------------------------------------- ----------------
37.0 CTL 80 06 00 01 00 00 12 00 GET DESCRIPTOR
37.0 18 IN 12 01 00 02 00 00 00 40 83 04 2a 57 00 02 01 02 .......@..*W....
03 01 ..
37.0 CTL 80 06 00 02 00 00 09 00 GET DESCRIPTOR
37.0 9 IN 09 02 20 00 01 01 04 c0 32 .. .....2
37.0 CTL 80 06 00 02 00 00 20 00 GET DESCRIPTOR
37.0 32 IN 09 02 20 00 01 01 04 c0 32 09 04 00 00 02 08 06 .. .....2.......
50 05 07 05 81 02 40 00 00 07 05 01 02 40 00 00 P.....@......@..
37.0 CTL 80 06 00 03 00 00 02 00 GET DESCRIPTOR
37.0 2 IN 04 03 ..
37.0 CTL 80 06 00 03 00 00 04 00 GET DESCRIPTOR
37.0 4 IN 04 03 09 04 ....
37.0 CTL 80 06 03 03 09 04 02 00 GET DESCRIPTOR
37.0 2 IN 1a 03 ..
37.0 CTL 80 06 03 03 09 04 1a 00 GET DESCRIPTOR
37.0 26 IN 1a 03 38 00 34 00 37 00 46 00 33 00 41 00 39 00 ..8.4.7.F.3.A.9.
43 00 30 00 44 00 33 00 35 00 C.0.D.3.5.
37.0 CTL 00 09 01 00 00 00 00 00 SET CONFIG
37.0 CTL 01 0b 00 00 00 00 00 00 SET INTERFACE
37.0 CTL a1 fe 00 00 00 00 01 00 GET MAX LUN
37.0 1 IN 00
注:已验证在STM32F407上是正常的; |