Re: USB Mass Storage Device



Have you gotten any of the other function drivers up and running? If
Bot_DeviceNotify is not called, chanses are your usb function
controller driver isn't working properly (If my memory serves me right
Bot_DeviceNotify is passed as an argument to the UfnMdd_Start function
and it ends up being called when the usb function controller driver
calls DeviceNotification function). I think you should start by looking
at the usb function controller driver, if it detects any activity on
the port, if it actually calls DeviceNotification etc.

Henrik Viklund
http://www.addlogic.se

Imti skrev:

Hi Henrik,

I am running debug image. Sometimes I will be building Release version
to check the control flow output. Since It will be fast.

BOT_DeviceNotify() function in Bot.cpp is not all called. Could you
please suggest who will be calling this function.

Thanks
Imtiaz Khan

Henrik Viklund wrote:
OK, "unknown device" sounds like a usbfn problem. You know, it's really
hard to make any intelligent suggestions without any debug info. I
think the "debug output" you pasted are actually retail messages so it
sounds a bit quiet to me. You're running a debug built image?

Henrik Viklund
http://www.addlogic.se

Imti skrev:

Hi

Just to be sure, you've tested that the SDCard is working OK?
-> Yes its working
When you put a SD memory card in the slot it appears in the file
system, right?
-> Yes ( Since GPIO interrupts are not working, we cannot do Hot
plug-play). The card has to be inserted before.
What debug output do you get when you attach the USB cable and have a
SD memory card in the slot?
-> Nothing seems to come. ( I doubt this is due to GPIO interrupts not
working on our target)
On Host PC "Unknown device"

When I was debugging the BOT_DeviceNotify() function, I checked it out
that the control is not going to Store_Init() function or UFN_ATTACH
function. It just directly goes to UFN_MSG_PREPROCESSED_SETUP_PACKET
case and thats all.

Thanks,

Imtiaz Khan.K.

Henrik Viklund wrote:
Hi Henrik,

I have changed the "DeviceName" to "DSK0:" and "DSK1:, but still same
status.

I was unable to connect to the device using Remote Registry Editor. My
download and debug are through Serial.

Just to be sure, you've tested that the SDCard is working OK? When you
put a SD memory card in the slot it appears in the file system, right?
What debug output do you get when you attach the USB cable and have a
SD memory card in the slot?


I have following doubts regarding USB Mass Storage Device

(1) Before USB Function Controller loads, is it required that "Storage
Card" should be mounted.

No, it is not required that the storage card is mounted when the msd
driver is loaded. However, it is required that the store the msd will
share (in this case the sd memory card) is mounted when the usb cable
is connected.

(2) Does "Storage Card" registry needs modifications to support USB
Mass Storage device.

No, it shold not need any alterations.


(3) Is "RAMDISK" needs to be added. (SYSGEN_RAMDISK).

No. ramdisk has nothing to do with msd and sdcards.

Henrik Viklund
http://www.addlogic.se


Thanks

Imtiaz Khan.K.

(3)
Henrik Viklund wrote:
The "DeviceName" registry setting looks wierd. It should match the
device manager name, i.e. "DSK0:" or "DSK1:" etc. If you're not sure
what name the SD Memory Storage class driver gets when it is activated,
you should be able to find it under
[HKEY_LOCAL_MACHINE\Drivers\Active] using the remote registry editor.

Henrik Viklund
http://www.addlogic.se

Imti skrev:

Hi,

I want to expose my SD Card as a USB Mass Storage Device. Here are the
details of the target device

(1) ISP1582 Peripheral Controller
(2) WINCE 5.0
(3) Have the physical device driver(PDD) from philips.

I have included the "Mass Storage" Component from the catalog.

The Device is registered and it has activated the "Mass Storage Class"
Client driver.
But on my PC it shows as "UNKNOWN DEVICE" found.

How can I set my registry, so that it corresponds to my SD CARD. SD
Card is mounted as
"Storage Card" on my target.

Here are the registry settings

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PDCI]
"Prefix"="UFN"
"Dll"="ISP1582Function.dll"
"Order"=dword:16
"Class"=dword:06
"SubClass"=dword:80
"ProgIF"=dword:00
"Priority256"=dword:64
"VendorID"=multi_sz:"10b5"
"DeviceID"=multi_sz:"5406"
"SubVendorID"=multi_sz:"10b5"
"SubsystemID"=multi_sz:"9054"
"IsrDll"="GIISR.dll"
"IsrHandler"="ISRHandler"
"EndpointCount"=dword:7
"SupportedSpeeds"=dword:6
"BusIoctl"=dword:2a0048
"MemBase"=dword:08000000
"MemLen"=dword:100000
"SysIntr"=dword:42

"IClass"=multi_sz:"{E2BDC372-598F-4619-BC50-54B3F7848D35}=%b","{6F40791D-300E-44E4-BC38-E0E63CA8375C}=%b"


[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers]
"DefaultClientDriver"=- ; erase previous default
[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers]
"ClientDriver"="\\Drivers\\USB\\FunctionDrivers\\Mass_Storage_Class"

[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Mass_Storage_Class]
"Dll"="usbmsfn.dll"
"idVendor"=dword:04CC
"idProduct"=dword:1BA7
"InterfaceSubClass"=dword:06
"InterfaceProtocol"=dword:50
"DeviceName"="Storage Card:"
"FriendlyName"="Mass Storage"
"Manufacturer"="Philips"
"Product"="Mass Storage"
"bcdDevice"=dword:0

Here are the debug messages

UsbFnMdd!UfnMdd_RegisterDevice: Device registered

UsbFnMdd!UfnMdd_Start: Function controller running

UsbFnMdd!CUfnBus::ActivateChild: Activated client driver
"Mass_Storage_Class"


Regards,

Imtiaz Khan

.



Relevant Pages

  • SunBlade150 (Sparc64) random system freeze
    ... 00:08.0 Multimedia audio controller: ALi Corporation M5451 PCI AC-Link ... 00:0c.3 USB Controller: Sun Microsystems Computer Corp. RIO USB ... usbcore: registered new driver usbfs ...
    (Debian-User)
  • limited bandwidth with SiS900 onboard NIC
    ... 00:02.7 Multimedia audio controller: Silicon Integrated Systems ... 00:03.0 USB Controller: Silicon Integrated Systems USB 1.0 ... Real Time Clock Driver v1.12 ... hub 1-0:1.0: USB hub found ...
    (Linux-Kernel)
  • Nforce2 sporadic hangs/freezes
    ... USB logitech quickcam express ... 00:02.0 USB Controller: nVidia Corporation nForce2 USB Controller (rev ... Serial driver version 5.05c with MANY_PORTS SHARE_IRQ ...
    (comp.os.linux.hardware)
  • Re: USBIP protocol
    ... 'Client' and 'Server' are totally not clear. ... machine in the closet without USB devices, or is the machine with the ... The controller machine now gets a device 9-2 which accesses the target ... client and hci-hcd is a host controller driver on the server. ...
    (Linux-Kernel)
  • Re: Sd card detect
    ... SDHCDRegisterHostController success only the card detection mechanism ... controller driver interface or i can write the same things in my ... Henrik Viklund wrote: ... obvious that the sdhc driver needs to be a dll and that it needs to be ...
    (microsoft.public.windowsce.platbuilder)