3.4 FTOTG210 Device-mode Application – Mass Storage
就是gm8126作为usb 盘使用,而不是它挂一张USB盘,在GM8126_USB_OTG_User_Guide_V1.0.pdf
按文档所说,Configure FOTG210 to Support File Storage in Device Mode
后,build时,出现编译错误,原因是没有打开dual speed support!
修改后,再次build,编译通过。下载,运行。再USB线连接PC机,打印:
Drive Vbus because of ID pin shows Device A
FOTG200 Controller Initialization
fotg200 int enable = 1f30
fotg_udc : ***** FTC OTG controller Device Linux Lower Driver *****
fotg_udc : L0: System initial, Please wait...
FOTG2XX is now in Mini-B type 0
fotg_udc : L1: System reset finish...
fotg_udc : L2: GM UDC reinit finish...
Init GM UDC ISR finished
Freeing init memory: 5920K
********************************************
Busybox starts to run /etc/init.d/rc.sysinit
********************************************
Mounting root fs rw ...
Mounting other filesystems ...
Setting hostname ...
Mounting user's MTD partion
Has JFFS2 on mtdblock1
keep all config files under /mnt/mtd/
Unable to handle kernel paging request at virtual address e3a02000
我初步怀疑是打开了内核的power management选项造成的,关掉它,再试通过。果然是这个原因,看来电源管理不是那么容易做的。
按文档说法:
use the script file “/ffmpeg/usbdevice.sh” to enable the USB device function
但SDK中没有/ffmpeg/usbdevice.sh,需要GM提供。