这个时序对吗?

外部固件模式:程序是例子程序USBDISK.C.那些描述符也都是USBDISK.H中的.这是什么原因

先收到电脑的: 80 06 00 01 00 00 40 00 收到后反回了只有16字节的设备描述符下面这个中断就产生了: 00 05 03 00 00 00 00 00 设置完地址后,收到: 80 06 00 01 00 00 12 00 然后反回了18字节的设备描述符,收到: 80 06 00 02 00 00 09 00 然后返回9字节的配置描述符,收到 80 06 00 02 00 00 ff 00 反回9字节的接口描述符,然后又收到了一个: 80 06 00 01 00 00 12 00 然后反回了18字节的设备描述符,收到: 80 06 00 02 00 00 09 00 然后返回7字节的端点描述符,收到 80 06 00 02 00 00 82 02 反回7字节的端点描述符.之后MCU就没有反应了.

Bus Hound 检测数据: Device Phase Data Description Cmd.Phase.Ofs(rep) Delta 7.0 CTL 23 01 14 00 02 00 00 00 CLEAR FEATURE 280.1.0 4us 2005-07-17 08:58:31.482 7.0 URB 50 00 08 00 00 00 00 00 c0 51 71 81 20 00 00 00 CONTROL TRANSFER 280.2.0 22us 2005-07-17 08:58:31.482 d8 51 71 81 0a 00 00 00 00 00 00 00 00 00 00 00 280.2.16 00 00 00 00 00 00 00 00 ff ff ff ff 0d f0 ad de 280.2.32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 280.2.48 00 00 00 00 00 00 00 00 23 01 14 00 02 00 00 00 280.2.64 7.0 CTL 80 06 00 02 00 00 ff 00 GET DESCRIPTOR 281.1.0 85ms 2005-07-17 08:58:31.567 7.0 LEN 09 00 00 00 9 281.2.0 1.9ms 2005-07-17 08:58:31.569 7.0 DI 09 04 00 00 02 08 04 50 00 .......P. 281.3.0 3us 2005-07-17 08:58:31.569 7.0 URB 50 00 08 00 00 00 00 00 f0 d3 8f 81 22 00 00 00 CONTROL TRANSFER 281.4.0 4us 2005-07-17 08:58:31.569 08 d4 8f 81 0b 00 00 00 09 00 00 00 68 7b 7e ff 281.4.16 b8 38 22 81 00 00 00 00 ff ff ff ff 0d f0 ad de 281.4.32 e0 35 22 81 40 00 00 00 00 00 00 00 00 00 00 00 281.4.48 38 f0 34 e1 00 00 00 00 80 06 00 02 00 00 ff 00 281.4.64 7.0 CTL a3 00 00 00 03 00 04 00 GET STATUS 282.1.0 22us 2005-07-17 08:58:31.569 7.0 LEN 04 00 00 00 4 282.2.0 32us 2005-07-17 08:58:31.569 7.0 DI 00 01 00 00 .... 282.3.0 2us 2005-07-17 08:58:31.569 7.0 URB 50 00 08 00 00 00 00 00 c0 51 71 81 22 00 00 00 CONTROL TRANSFER 282.4.0 3us 2005-07-17 08:58:31.569 d8 51 71 81 0b 00 00 00 04 00 00 00 58 10 a5 81 282.4.16 b8 38 22 81 00 00 00 00 ff ff ff ff 0d f0 ad de 282.4.32 e0 35 22 81 40 00 00 00 00 00 00 00 00 00 00 00 282.4.48 38 f0 34 e1 00 00 00 00 a3 00 00 00 03 00 04 00 282.4.64 17.0 CTL 80 06 00 01 00 00 12 00 GET DESCRIPTOR 283.1.0 17ms 2005-07-17 08:58:31.587 17.0 LEN 12 00 00 00 18 283.2.0 2.2ms 2005-07-17 08:58:31.589 17.0 DI 12 01 10 01 00 00 00 08 48 43 37 55 00 01 00 00 ........HC7U.... 283.3.0 2us 2005-07-17 08:58:31.589 00 01 .. 283.3.16 17.0 URB 50 00 08 00 00 00 00 00 f0 d3 8f 81 22 00 00 00 CONTROL TRANSFER 283.4.0 3us 2005-07-17 08:58:31.589 08 d4 8f 81 df b8 53 80 12 00 00 00 b8 d7 8b fd 283.4.16 68 b8 2f 81 00 00 00 00 ff ff ff ff 0d f0 ad de 283.4.32 00 00 04 c0 01 00 00 00 64 09 e8 f9 64 09 e8 f9 283.4.48 00 00 00 00 00 00 00 00 80 06 00 01 00 00 12 00 283.4.64 17.0 CTL 80 06 00 02 00 00 09 00 GET DESCRIPTOR 284.1.0 12us 2005-07-17 08:58:31.589 17.0 LEN 07 00 00 00 7 284.2.0 960us 2005-07-17 08:58:31.590 17.0 DI 07 05 82 02 40 00 00 ....@.. 284.3.0 2us 2005-07-17 08:58:31.590 17.0 URB 50 00 08 00 00 00 00 00 f0 d3 8f 81 22 00 00 00 CONTROL TRANSFER 284.4.0 2us 2005-07-17 08:58:31.590 08 d4 8f 81 0b 00 00 00 07 00 00 00 08 09 e8 f9 284.4.16 68 b8 2f 81 00 00 00 00 ff ff ff ff 0d f0 ad de 284.4.32 12 00 00 00 b8 d7 8b fd 68 b8 2f 81 00 00 00 00 284.4.48 ff ff ff ff 0d f0 ad de 80 06 00 02 00 00 09 00 284.4.64 17.0 CTL 80 06 00 02 00 00 82 02 GET DESCRIPTOR 285.1.0 13us 2005-07-17 08:58:31.590 17.0 LEN 07 00 00 00 7 285.2.0 980us 2005-07-17 08:58:31.591 17.0 DI 07 05 02 02 40 00 00 ....@.. 285.3.0 2us 2005-07-17 08:58:31.591 17.0 URB 50 00 08 00 00 00 00 00 f0 d3 8f 81 22 00 00 00 CONTROL TRANSFER 285.4.0 2us 2005-07-17 08:58:31.591 08 d4 8f 81 0b 00 00 00 07 00 00 00 88 98 ed fc 285.4.16 68 b8 2f 81 00 00 00 00 ff ff ff ff 0d f0 ad de 285.4.32 12 00 00 00 b8 d7 8b fd 68 b8 2f 81 00 00 00 00 285.4.48 ff ff ff ff 0d f0 ad de 80 06 00 02 00 00 82 02 285.4.64 17.0 CTL 00 09 00 00 00 00 00 00 SET CONFIG 286.1.0 23us 2005-07-17 08:58:31.591 17.0 USTS 00 0f 00 c0 bad config desc 286.2.0 5us 2005-07-17 08:58:31.591 17.0 URB 18 00 00 00 00 0f 00 c0 f0 d3 8f 81 00 00 00 00 SELECT CONFIG 286.3.0 2us 2005-07-17 08:58:31.591 88 98 ed fc 00 00 00 00 286.3.16

计算机在要配置描述符时好象你传输的不对,09 04 00. 04不是配置描述符标志.00长度为0怎麽处理.


计算机要要两次配置符吗?在收到 80 06 00 02 00 00 09 00 返回了9字节的配置描述符,然后又收到

80 06 00 02 00 00 ff 00 反回9字节的接口描述符

这样不对吗?


请问这个时序对吗?为什么没人解答呀?


这样给你说,你的描述符上传有问题,计算机给要什麽数据你只要正确上传就行了,不要管计算机为什麽这样给你要数据.


引用回复:这样给你说,你的描述符上传有问题,计算机给要什麽数据你只要正确上传就行了,不要管计算机为什麽这样给你要数据.

我知道计算机要什么给什么,我问的就是我给的对不对?

先收到电脑的: 80 06 00 01 00 00 40 00 收到后反回了只有16字节的设备描述符下面这个中断就产生了: 00 05 03 00 00 00 00 00 设置完地址后,收到: 80 06 00 01 00 00 12 00 然后反回了18字节的设备描述符,收到: 80 06 00 02 00 00 09 00 然后返回9字节的配置描述符,收到 80 06 00 02 00 00 ff 00 反回9字节的接口描述符,然后又收到了一个: 80 06 00 01 00 00 12 00 然后反回了18字节的设备描述符,收到: 80 06 00 02 00 00 09 00 然后返回7字节的端点描述符,收到 80 06 00 02 00 00 82 02 反回7字节的端点描述符.之后MCU就没有反应了.

这是我发送给电脑的包内容: ConDes: DB 009H ;描述符大小 DB 002H ;常数CONFIG DB 020H ;此配置传回所有数据大小 DB 000H DB 001H ;接口数 DB 001H ;配置值 DB 000H 索引 DB 080H ;电源设置 DB 040H ;需要总线电源 ConDes0: ;接口描述符 DB 009H ;描述符大小 DB 004H ;常数INTERFACE DB 000H ;识别码 DB 000H ;代替数值 DB 002H 支持的端点数 DB 008H 类别码 DB 004H 子类别码 DB 050H ;协议码 DB 000H ;索引 ConDes1: ;端点描述符 DB 007H ;述符大小 DB 005H ;常数ENDPOINT DB 082H ;端点数目及方向 DB 002H ;支持的传输类型 DB 040H ;支持的最大信息包大小 DB 000H DB 000H ConDes2: DB 007H DB 005H DB 002H DB 002H DB 040H DB 000H DB 000H ConDes3: DB 007H DB 005H DB 081H DB 003H DB 008H DB 000H DB 001H ConDes4: DB 007H DB 005H DB 001H DB 002H DB 008H DB 000H DB 000H


描述符没问题,应该是你程序的问题.

7.0 CTL 80 06 00 02 00 00 ff 00 GET DESCRIPTOR 281.1.0 85ms 2005-07-17 08:58:31.567 7.0 LEN 09 00 00 00 9 281.2.0 1.9ms 2005-07-17 08:58:31.569 7.0 DI 09 04 00 00 02 08 04 50 00 .......P.

80 06 00 02 00 00 09 00 GET DESCRIPTOR 284.1.0 12us 2005-07-17 08:58:31.589 17.0 LEN 07 00 00 00 7 284.2.0 960us 2005-07-17 08:58:31.590 17.0 DI 07 05 82 02 40 00 00

都是要配置描述符,你却返回不一样,而且第二个为什麽返回端点描述符. 09 04 00 00 02 08 04 50 00 根本不是设备描述符


80 06 00 02 00 00 09 00 是要设备描述符还是要配置描述符?协议上说这是要配置描述符.可我返回配置描述符后也不对呀


谢谢,我找到原因了,驱动程序安装有问题.成功了.


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