主题 : kasim,深夜1点了,发帖请教USB Gadget问题 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 15
精华: 0
发帖: 14
金钱: 85 两
威望: 18 点
综合积分: 28 分
注册时间: 2008-01-07
最后登录: 2012-01-04
楼主  发表于: 2009-08-30 00:37

 kasim,深夜1点了,发帖请教USB Gadget问题

kasim,拜读了你的大作,在mini2440上使用USB Gadget功能一文http://www.aiothome.com/bbs/read.php?tid=1753
我是QQ2440V3的板子,内核文件也编译成功了,且也能按照步骤加载驱动,运行如下:
[root]#modprobe s3c2410_udc
s3c2410_udc: debugfs dir creation failed -19
s3c2440-usbgadget s3c2440-usbgadget: S3C2440: increasing FIFO to 128 bytes
[root]#cd /lib/modules/2.6.29.4/
[root]#insmod g_file_storage.ko file=/dev/udisk  stall=0 removable=1
g_file_storage gadget: File-backed Storage Gadget, version: 20 November 2008
g_file_storage gadget: Number of LUNs=1
g_file_storage gadget-lun0: ro=0, file: /dev/udisk (arm板子上u盘分区能正常访问,设备文件为/dev/udisk)
[root]#lsmod
g_file_storage 31380 0 - Live 0xbf00b000
s3c2410_udc 21656 1 g_file_storage, Live 0xbf000000

这个时候插上USB线(vivi下通过usb下载程序无问题),PC没有发现任何新硬件(期望出现U盘)
modprobe g_serial在arm板上加载也正常,可惜插上usb线后,同样PC没有发现任何新硬件(所谓的USB转串口)

请问,mini2440在实现USB Gadget,需要对硬件端口做什么特殊的初始化吗?
谢谢!
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2009-08-30 12:05
mini2440上有一个USB_EN的使能信号,要使用USB Gadget功能必须把这个信号拉高。是哪一个GPIO你看一下原理图就知道了。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."