none
USB Stick is not detected after a warm reset on WinCE device RRS feed

  • Question

  • Hi,

    A USB stick is detected and displayed as "Hard Disk" on my WinCE device after power-on.  Doing a warm reset (by momentarily pulling the OMAP3530 processor WARM_RESET pin low or executing Restart.exe), my device reboots normally and goes the shell.  Exploring "My Device", "Hard Disk" is no longer there.  Unplugging and re-plugging the USB stick does not help, even when using a hub.

    Do you have any advice for me on how to resolve this issue?

    In appreciation,

    Luan


    Luan Le
    Thursday, November 18, 2010 12:19 AM

All replies

  • Hi Luan,

    it would be nice if you specify what version of Windows CE are you using with your OMAP processor....?

    Best regards

    SergeiR

     

    Thursday, November 18, 2010 12:55 AM
  • Hi SergeiR,

    I am using Windows CE 6.0 R3 with TI WinCE BSP 6.15.00.

    Thanks,

    Luan


    Luan Le
    Thursday, November 18, 2010 1:03 AM
  • Okay, then I would suggest the following

    - make a full Debug build of your platform with KITL and kernel debugger enabled

    - power off your platform, remove usb stick, power on your device

    - launch this build on your device, get PB connected

    - wait until your platform fully booted Windows CE6 OS

    - (*) enable maximum debug zones in usb DLLs, including usb host contrioller driver, usb mass storage drver etc.

    - insert your usb stick. Your usb mass storage device will be recognized, DSKn: will be added, and a new file system mounted as well

    - save the output of PB to a file from point * above

    - perform the same sequence as above but when a warm reset is used instead of power on. Your usb stick will not be recognized - new file system will not be mounted. DSKn: may be added though.

    - compare two PB outputs, filtering out unrelated lines.

    That might tell you the difference between things happening when after power on and when after warm reset. Typically I would expect that warm reset maybe would not clear memory, i.e. preserve it, thus if affecting results.

    Hope this helps

    SergeiR

    Thursday, November 18, 2010 6:13 PM
  • Hi SergeiR,

    After power-on reset, as showed on the PB outputs, all the correct drivers are loaded and unloaded when inserting and removing the usb stick, mouse, or keyboard.  Doing a warm reset with the usb stick, mouse, and keyboard attached, none of the drivers are loaded for these devices.   After that, inserting or removing any of the usb device does not cause any additional output, even when debug zones in several usb DLLs (usbd.dll, musbfn.dll, musbhcd.dll) are enabled.

    Do you think this is a hardware or software problem?  Your advice for the next debug step will be greatly appreciated.

    Best Regards,

    Luan

     


    Luan Le
    Friday, November 19, 2010 12:38 AM
  • Hi Luan,

    so let me summarize your observations. Correct me if I'm wrong.

    1. When your platform boots up from power off state, then all your usb device drivers load properly (observed through kernel debugger output in PB Debug build), and consequently plugging in usb mass storage device (usb stick) produces expected result - mounted volume

    2. When your platform boots up from warm reset state, then your usb device drivers do NOT load at all (this need clarification in my opinion. Maybe they load but fail to start or load and then unload because cannot talk to some peripheral etc. ?), and consequently plugging in usb mass storage device (usb stick) produces no result.

    Is this correct (please also see notes in brackets) ?

    SergeiR

    Saturday, November 20, 2010 12:28 AM
  • I'd say do a complete reset of your USB controller in your USB
    controller driver (the part that's in your BSP). Take a look at the
    datasheet and find out how to fully reset the controller part. It's
    probably not reset properly with a warm reset and the controller can't
    be reinitialized properly without a full reset of the controller.
     

    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.
    Saturday, November 20, 2010 8:48 AM
    Moderator
  • Hi SergeiR and Michel,

    After a cold reset, all of the following DLLs are loaded when I have usb stick, mouse, and keyboard connected:

    usbd.dll
    ehcihcd.dll

    usbhid.dll
    mouhid.dll
    kbdhid.dll
    hidparse.dll
    usbdisk6.dll
    usbmsc.dll

    After a warm reset, only usbd.dll and ehcihcd.dll are loaded.  The rest of them are not and there are no indications of loading failures.

    I put some printfs in the pdd part of the EHCI driver and do not see any differences between cold and warm reboots.

    Do you have any tips on how to figure out why these DLLs are not getting loaded after a warm reset?

    Thanks,

    Luan


    Luan Le
    Monday, November 22, 2010 6:34 PM
  • Hi Luan,

    Looking at the fact that in both cases usbd.dll and ehcihcd.dll  are loaded, and as Michel pointed out, something prevents further step to load, say, usbdisk6.dll when you insert a usb stick. This may be the following : no interrupt is generated when media inserted into your usb controller in warm reset scenario. I.e. something is not initialized in warm reset case in your platform usb driver, but is initialzed after cold boot.

    As Michel suggested, could you please look into your platform usb driver code and check whether the usb controller initialization is conditional ? Such initializion may be skipped silently, so that you will not see any difference in the output, since driver developer may have decided not to bother with this option.

    SergeiR

    Monday, November 22, 2010 11:23 PM
  • You'll have to tell the controller to re-enumerate the devices.
    Implement that, or fully reset the controller at initialization.
     

    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.
    Tuesday, November 23, 2010 10:12 AM
    Moderator