How to get USB mass storage device class to work on Colibri T30

I am struggling with getting the basic USB Mass Storage class for an “SD Memory Card” to work on WinCE 7.

I followed the instructions on the web page: http://developer.toradex.com/knowledge-base/usb-function-driver-(colibri)

I changed the registry entries as described for Windows Embedded Compact (changes in bold):

[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers]
“DefaultClientDriver”="Mass_Storage_Class"

[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Mass_Storage_Class]
“DeviceName”="SD Memory Card"
“Dll”=“usbmsfn.dll”
“InterfaceSubClass”=dword:00000006
“InterfaceProtocol”=dword:00000050
“FriendlyName”=“Mass Storage”
“idVendor”=dword:0000045e
“Manufacturer”=“Generic Manufacturer (PROTOTYPE–Remember to change idVendor)”
“idProduct”=dword:0000ffff
“Product”=“Generic Mass Storage (PROTOTYPE–Remember to change idVendor)”
“bcdDevice”=dword:00000000

However when I connected to a PC, the device seemed to be recongised as a Mass Storage class, but I got a Code 10 device cannot start. The SD card was fitted and showed up from the Windows CE explorer as “SD Card”.

I did not change the registry apart from this. Is there something else that needs changing?

By the way I exported the registry as a text file so I could send this though if it would help.

Some progress: I can get it to work if I put:

“DeviceName”=“DSK2:”

I have also realised that the “Code 10” and failure to start, occurs when you power cycle or reset the T30 / Colibri Evaluation board. You need to physically unplug and then re-plug the USB connection for it to work, for some reason.

Thanks for reporting this issue. Sharing SD Card and USB Memory devices seems not to work properly. There seems to be an issue with the driver load order, which we have to further investigate. We have added an issue to our roadmap (will be published on our roadmap after a review process).

Sharing the internal storage works fine. Until we have a solution for this issue you may can use this one.

Hi Samuel,

Thanks for your answer. Sorry, but I need to understand your answer a little better.

By “internal storage” do you mean the internal Flashdisk? If so this is not suitable for our purposes because it is not large enough.

It seems to me that “DeviceName”=“DSK2:” exposed the SD card correctly. Whilst having to unplug/replug is annoying, this still allows it to be used as mass storage at least. When you say “do not seem to work properly”, do you mean there are other issues as well as having to unplug/replug?

Thanks.

Yes with internal storage I mean the internal Falshdisk.

There is no other known issue currently other than the unplug/replug issue.

May be there would be a workaround by unloading / loading the USB FN driver or toggle the Cable Detect pin. The toggle solution solves the issue (Set SODIMM 137 to output and toggle to 0 and to 1 again) is not really nice from the hardware point of view. What you could do is to controll the plug / unplug completly in software by switching the CableDetect pin to an other SODIMM, so you would not drive against the SODIMM 137.