打印
[圈圈教你玩USB]

USB枚举复位的问题?

[复制链接]
3216|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
USB, rc, dc, ST, se
我使用的是S3C2440的芯片。在网上找了些代码进行移植。但是出现很多问题。USB也是刚刚接触。也买了本书准备看看,但是书还在路上,有以下的问题请教一下:
说明一下,我要做的是将2440的NAND FLASH芯片模拟成U盘与PC进行通信。
1:所有USB芯片的EP0主要的职责范围是什么?比如EP0只是枚举USB初步枚举信息的吗?在使用U盘中,会用到枚举U盘的信息。这个信息是在EP0中进行的吗?看到很多代码的EP0中断中都没有相关的代码。
2:如果U盘的枚举信息是在EP1.2.3.4等端点里进行的。那选择这些端点的命令是由HOST发出的吗?我现在调试的信息中中断一直在EP0中操作。没有进过其他的端点。附上串口打印的信息。(如下)在打印的信息中发现
[RCV:0,9,1,0,0,0,0,0,]
usb_conf
USB
USB
[RCV:a1,fe,0,0,0,0,1,0,]
set LUN
到这应该EP0的任务就算完成了呀!但是USB又重新进行了复位。不知何原因?下面是详细的打印代码。
USB
REST
USB
[RCV:80,6,0,1,0,0,40,0,]
[GDD]
[GDD0]
USB
[SETUPEND]
USB
REST
USB
[RCV:0,5,6,0,0,0,0,0,]
ADDR
USB
USB
[RCV:80,6,0,1,0,0,12,0,]
[GDD]
[GDD0]
USB
[GDD1]
USB
[GDD2]
USB
USB
[RCV:80,6,0,2,0,0,9,0,]
[GDC]
[GDCO0]
USB
[GDCO1]
USB
USB
[RCV:80,6,0,2,0,0,ff,0,]
[GDC]
[GDC0]
USB
[GDC1]
USB
[GDC2]
USB
[GDC3]
USB
[GDC4]
USB
USB
[RCV:80,6,0,3,0,0,ff,0,]
[GDS]
[GDS0_0]
USB
USB
[RCV:80,6,2,3,9,4,ff,0,]
[GDS]
[GDS2_0]
USB
[GDS2_1]
USB
[GDS2_2]
[E]
USB
USB
[RCV:80,6,0,3,0,0,ff,0,]
[GDS]
[GDS0_0]
USB
USB
[RCV:80,6,2,3,9,4,ff,0,]
[GDS]
[GDS2_0]
USB
[GDS2_1]
USB
[GDS2_2]
[E]
USB
USB
[RCV:80,6,0,1,0,0,12,0,]
[GDD]
[GDD0]
USB
[GDD1]
USB
[GDD2]
USB
USB
[RCV:80,6,0,2,0,0,9,0,]
[GDC]
[GDCO0]
USB
[GDCO1]
USB
USB
[RCV:80,6,0,2,0,0,20,0,]
[GDC]
[GDC0]
USB
[GDC1]
USB
[GDC2]
USB
[GDC3]
USB
[SETUPEND]
USB
[RCV:0,9,1,0,0,0,0,0,]
usb_conf
USB
USB
[RCV:a1,fe,0,0,0,0,1,0,]
set LUN
USB
USB
REST
USB
[RCV:80,6,0,1,0,0,40,0,]
[GDD]
[GDD0]
USB
[SETUPEND]
USB
REST
USB
[RCV:0,5,7,0,0,0,0,0,]
ADDR
USB
USB
[RCV:80,6,0,1,0,0,12,0,]
[GDD]
[GDD0]
USB
[GDD1]
USB
[GDD2]
USB
USB
[RCV:80,6,0,2,0,0,9,0,]
[GDC]
[GDCO0]
USB
[GDCO1]
USB
[RCV:0,9,1,0,0,0,0,0,]
usb_conf
USB
USB
REST
USB
[RCV:80,6,0,1,0,0,40,0,]
[GDD]
[GDD0]
USB
[SETUPEND]
USB
REST
USB
[RCV:0,5,6,0,0,0,0,0,]
ADDR
USB
USB
[RCV:80,6,0,1,0,0,12,0,]
[GDD]
[GDD0]
USB
[GDD1]
USB
[GDD2]
USB
USB
[RCV:80,6,0,2,0,0,9,0,]
[GDC]
[GDCO0]
USB
[GDCO1]
USB
[RCV:0,9,1,0,0,0,0,0,]
usb_conf
USB
USB
REST
USB
[RCV:80,6,0,1,0,0,40,0,]
[GDD]
[GDD0]
USB
[SETUPEND]
USB
REST
USB
[RCV:0,5,7,0,0,0,0,0,]
ADDR
USB
USB
[RCV:80,6,0,1,0,0,12,0,]
[GDD]
[GDD0]
USB
[GDD1]
USB
[GDD2]
USB
USB
[RCV:80,6,0,2,0,0,9,0,]
[GDC]
[GDCO0]
USB
[GDCO1]
USB
[RCV:0,9,1,0,0,0,0,0,]
usb_conf
USB
到此就再也没有进中断。PC识别的信息是:(如下图所示)

USB识别截图.jpg (9.88 KB )

USB识别截图.jpg

相关帖子

沙发
David_ming| | 2011-9-19 23:12 | 只看该作者
漏洞太大了,解释了也不一定能懂,还有,鬼知道你这些缩写是什么意思呢~~~

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

2

主题

26

帖子

1

粉丝