本人基于深圳友坚的ideal6410来实现USB mass storage,相关内容如下:
1.添加组件”Device Drivers”->”USB Function”->”USB Function Clients”->”Mass Storage”。
2.platform.reg中相关的注册表信息如下:
;------------ USB Function Mass Stroge Driver ---------------------------------
IF BSP_USBFNCLASS == MASS_STORAGE
[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers]
"DefaultClientDriver"="Mass_Storage_Class"
[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Mass_Storage_Class]
"Dll"="usbmsfn.dll"
"InterfaceSubClass"=dword:06
"InterfaceProtocol"=dword:50
"DeviceName"="DSK3:"
"FriendlyName"="Mass Storage"
"idVendor"=dword:045E
"Manufacturer"="Generic Manufacturer (PROTOTYPE--Remember to change idVendor)"
"idProduct"=dword:FFFF
"Product"="Generic Mass Storage (PROTOTYPE--Remember to change idVendor)"
"bcdDevice"=dword:0
;"Removable"=dword:0
"Removable"=dword:1
[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class]
"Index"=dword:3
[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class\High_Capacity]
"Index"=dword:3
[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\MMC_Class]
"Index"=dword:3
ENDIF BSP_USBFNCLASS
重新编译之后生成的NK.bin更新之后,用usb device线连接到PC机上,但PC机上没有看到多的盘符,只是在PC机上的“设备管理器->通用串行控制器”多出一个带感叹号的“USB mass storage device”,串口输出下面的信息
[UFNPDD] RESET Again
[UFNPDD] RESET Again
目前还不知道为什么不行,麻烦知道的朋友指教一下,先谢谢了。
------解决方案--------------------
注册表应该没有问题,我的也是这样,可以,不过需要格式化后才能使用,格式化后一旦重启,就再也不行,因为nandflash里面放注册表的文件夹没了,所以要正常工作要该下面的驱动。
友坚的开发板感觉还是不太专业,很多都支持的不好,或者根本就不行,跟他们的说明还是有点差距的。
------解决方案--------------------
我用的是友坚另一块6410的版子,可以看到盘符。只是必须格式化了后才能使用。
------解决方案--------------------
s5pv210下的mass storage很正常 我把reg配置给你参考下。
IF BSP_USBFN_MSF
[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers]
"DefaultClientDriver"=- ; erase previous default
"DefaultClientDriver"="Mass_Storage_Class"
[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class]
"Index"=dword:3
[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class\High_Capacity]
"Index"=dword:3
[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\MMC_Class]
"Index"=dword:3
ENDIF
[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Mass_Storage_Class]
"Dll"="usbmsfn.dll"
"InterfaceSubClass"=dword:06
"InterfaceProtocol"=dword:50
"FriendlyName"="Mass Storage"
"idVendor"=dword:045E
"Manufacturer"="Generic Manufacturer (PROTOTYPE--Remember to change idVendor)"
"idProduct"=dword:FFFF
"Product"="Generic Mass Storage (PROTOTYPE--Remember to change idVendor)"
"bcdDevice"=dword:0
; for SDMMC
"DeviceName"="DSK3:" ; SDMMC DSK index
"Removable"=dword:1 ; Removable option
"Type"=dword:1 ;0-nand, 1-sdmmc
"SDSlot0"="HSC1:" ; SD Slot
[HKEY_LOCAL_MACHINE\Drivers\USB\ClientDrivers\Mass_Storage_Class]
"PacketsPerTransfer"=dword:180; change transfer size to 64KB from 8KB
------解决方案--------------------
C100上也很正常,就是"DeviceName"="DSK3:" 这里不能和NAFLSH的盘符冲突
;------------ USB Function Mass Stroge Driver ---------------------------------
IF BSP_USBFNCLASS == MASS_STORAGE
[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers]
"DefaultClientDriver"="Mass_Storage_Class"
[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Mass_Storage_Class]
"Dll"="usbmsfn.dll"
"InterfaceSubClass"=dword:06
"InterfaceProtocol"=dword:50
"DeviceName"="DSK1:"
"FriendlyName"="Mass Storage"
"idVendor"=dword:045E
"Manufacturer"="Generic Manufacturer (PROTOTYPE--Remember to change idVendor)"
"idProduct"=dword:FFFF
"Product"="Generic Mass Storage (PROTOTYPE--Remember to change idVendor)"
"bcdDevice"=dword:0
"Removable"=dword:0
[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class]