CH372原版固件添加串口监控枚举后不成功

原版的能够正常枚举,添加串口监控后不能枚举,请高手解答 这是工程[b]文字[/b] UploadImages/201421816261398.rar 监控的数据包 Device Length Phase Data Description ------ -------- ----- -------------------------------------------------- ---------------- 10.1 2 IN 04 00 .. 8.0 CTL a3 00 00 00 01 00 04 00 CLASS 8.0 4 IN 03 05 00 00 .... 10.0 CTL a3 00 00 00 02 00 04 00 GET STATUS 10.0 4 IN 01 01 01 00 .... 8.0 CTL a3 00 00 00 01 00 04 00 CLASS 8.0 4 IN 03 05 00 00 .... 10.0 CTL 23 01 10 00 02 00 00 00 CLEAR FEATURE 8.0 CTL a3 00 00 00 01 00 04 00 CLASS 8.0 4 IN 03 05 00 00 .... 10.0 CTL a3 00 00 00 02 00 04 00 GET STATUS 10.0 4 IN 01 01 00 00 .... 8.2 32 IN 00 e0 e0 e0 00 e0 e0 e0 e0 00 e0 00 00 e0 00 e0 ................ 00 e0 e0 e0 00 e0 00 00 e0 e0 00 e0 00 e0 e0 e0 ................ 8.2 31 IN e0 e0 00 00 e0 00 00 e0 00 e0 e0 e0 00 e0 00 00 ................ 00 e0 e0 e0 00 00 e0 e0 e0 e0 e0 e0 e0 00 e0 ............... 8.0 CTL a3 00 00 00 01 00 04 00 CLASS 8.0 4 IN 03 05 00 00 .... 10.0 CTL 23 03 04 00 02 00 00 00 SET FEATURE 10.1 2 IN 04 00 .. 8.0 CTL a3 00 00 00 01 00 04 00 CLASS 8.0 4 IN 03 05 00 00 .... 10.0 CTL a3 00 00 00 02 00 04 00 GET STATUS 10.0 4 IN 03 01 10 00 .... 8.0 CTL a3 00 00 00 01 00 04 00 CLASS 8.0 4 IN 03 05 00 00 .... 10.0 CTL 23 01 14 00 02 00 00 00 CLEAR FEATURE 8.0 CTL a3 00 00 00 01 00 04 00 CLASS 8.0 4 IN 03 05 00 00 .... 10.0 CTL a3 00 00 00 02 00 04 00 GET STATUS 10.0 4 IN 03 01 00 00 .... 8.2 3 IN e0 00 e0 ... 8.0 CTL a3 00 00 00 01 00 04 00 CLASS 8.0 4 IN 03 05 00 00 .... 10.0 CTL 23 03 04 00 02 00 00 00 SET FEATURE 10.1 2 IN 04 00 .. 8.0 CTL a3 00 00 00 01 00 04 00 CLASS 8.0 4 IN 03 05 00 00 .... 10.0 CTL a3 00 00 00 02 00 04 00 GET STATUS 10.0 4 IN 03 01 10 00 .... 8.0 CTL a3 00 00 00 01 00 04 00 CLASS 8.0 4 IN 03 05 00 00 .... 10.0 CTL 23 01 14 00 02 00 00 00 CLEAR FEATURE 8.0 CTL a3 00 00 00 01 00 04 00 CLASS 8.0 4 IN 03 05 00 00 .... 10.0 CTL a3 00 00 00 02 00 04 00 GET STATUS 10.0 4 IN 03 01 00 00 .... 8.0 CTL a3 00 00 00 01 00 04 00 CLASS 8.0 4 IN 03 05 00 00 .... 10.0 CTL 23 03 04 00 02 00 00 00 SET FEATURE 10.1 2 IN 04 00 .. 8.0 CTL a3 00 00 00 01 00 04 00 CLASS 8.0 4 IN 03 05 00 00 .... 10.0 CTL a3 00 00 00 02 00 04 00 GET STATUS 10.0 4 IN 03 01 10 00 .... 8.0 CTL a3 00 00 00 01 00 04 00 CLASS 8.0 4 IN 03 05 00 00 .... 10.0 CTL 23 01 14 00 02 00 00 00 CLEAR FEATURE 8.0 CTL a3 00 00 00 01 00 04 00 CLASS 8.0 4 IN 03 05 00 00 .... 10.0 CTL a3 00 00 00 02 00 04 00 GET STATUS 10.0 4 IN 03 01 00 00 .... 8.0 CTL a3 00 00 00 01 00 04 00 CLASS 8.0 4 IN 03 05 00 00 .... 10.0 CTL 23 03 04 00 02 00 00 00 SET FEATURE 10.1 2 IN 04 00 .. 8.0 CTL a3 00 00 00 01 00 04 00 CLASS 8.0 4 IN 03 05 00 00 .... 10.0 CTL a3 00 00 00 02 00 04 00 GET STATUS 10.0 4 IN 03 01 10 00 .... 8.0 CTL a3 00 00 00 01 00 04 00 CLASS 8.0 4 IN 03 05 00 00 .... 10.0 CTL 23 01 14 00 02 00 00 00 CLEAR FEATURE 8.0 CTL a3 00 00 00 01 00 04 00 CLASS 8.0 4 IN 03 05 00 00 .... 10.0 CTL a3 00 00 00 02 00 04 00 GET STATUS 10.0 4 IN 03 01 00 00 .... 8.0 CTL a3 00 00 00 01 00 04 00 CLASS 8.0 4 IN 03 05 00 00 .... 10.0 CTL 23 01 01 00 02 00 00 00 CLEAR FEATURE 8.0 CTL a3 00 00 00 01 00 04 00 CLASS 8.0 4 IN 03 05 00 00 .... 10.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 10.0 4 IN 03 01 00 00 .... 8.0 CTL 40 a1 9c c3 8b cc 00 00 VENDOR 8.0 CTL 40 9a 2c 0f 07 00 00 00 VENDOR 8.0 CTL 40 a4 df 00 00 00 00 00 VENDOR 8.0 CTL 40 a4 9f 00 00 00 00 00 VENDOR 8.0 CTL c0 95 06 07 00 00 02 00 VENDOR

添加串口信息不影响程序的正常使用,你的打印信息是什么?有没有进入外部中断?最好是串口使用查询方式。

从你的USB数据包来看,获取设备描述符的命令都没发下来。


else if(!((c1=request.r.bmRequestType)&0x60)){ //标准请求 这段代码有疑问这样怎么判断出是标准请求?? 整个工程我都打包发上来了,能帮忙看看吗?没有用进入外部中断,监控显示只有初始化正确


标准请求的话bmRequestType的D6、D5位为0(详细可以看一下USB规范),结合程序除了0x20和0x60外都是标准请求。 建议你串口使用查询方式,保证能正确进入外部中断。


能不能解释下串口为什么不能用中断方式,如果这样别的中断能不能用,奇怪的问题………………


只要设置好中断优先级应该是可以使用的,因为你不断地在打印不建议你这么做。


只有登录才能回复,可以选择微信账号登录