USB overcurrent handling RRS feed

  • Question

  • Hi there,

    WinCE600 has a default routine when it detects an overcurrent state ?

    Where I can modify the behaviour? I'd like to show a dialog with a message and reset the port.

    Thanks !

    Thursday, August 5, 2010 1:03 PM

All replies

  • Im not 100% sure on this, but wouldnt this be hardware specific?

    We implement this in WinCE 5.0, but through the use of an external USB power "switch" which signals a common interrupt (via GPIO to our processor) when an overcurrent occurs...

    I dont know how WinCE would know about the current being drawn over USB?

    • Proposed as answer by Wolfgang Wallner Friday, August 13, 2010 8:03 AM
    • Unproposed as answer by SteMMo Friday, August 13, 2010 1:36 PM
    Wednesday, August 11, 2010 7:04 AM
  • No, not really. The USB Hub Specification (USB 2.0 spec chapter  11.12.5) defines how over-current situation are reported.

    The USB Host Controller Driver (HCD) handles alll hub status change notifications as part of the common code shipped by Microsoft.

    For a USB 2.0 Host Controller, find the implementation in <WINCEROOT>\public\common\oak\drivers\usb\hcd\usb20\usb2com\cdevice.cpp - search for "CHub::HubStatusChangeThread"


    MVP Windows Embedded
    Wednesday, August 11, 2010 7:04 PM
  • Hi all,

    I marked juansta's post as "Proposed answer" by mistake ... somehow I can't revert that ... sorry.

    If there are any forum moderators around, please edit this, thanks.

    Friday, August 13, 2010 8:11 AM
  • hmmm... ok, maybe I need to revisit the way our overcurrent is signalled to WinCE...

    How does WinCE know the USB port has drawn more than the allowable current without knowledge of what is happening in the hardware?

    It reports it as per the USB spec, but what trigers this reporting?

    I thought I'd post the question here instead of another thread as it is related/the same thing...

    Monday, August 16, 2010 10:32 PM
  • The USB Hub hardware implements the overcurrent protection. The hub controller hardware detects the overcurrent situation and triggers the reporting to the host.

    How that's implemented may be specific to the chip you're using.

    MVP Windows Embedded
    Tuesday, August 17, 2010 10:58 AM
  • Hi,

    The device that we are using is OMAP-L138. I am looking at Over Current Protection reporting mechanism to MDD layer.

    One of the IC's Pin present on HW is connected to the OMAP-L138 GPIO.

    We don't have control over VBUS on and off to OHCI Port.

    In HCDPdd_Init I wanted to create a thread which will wait for interrupt to occur on the GPIO.

    But, when Over current detected can we report it ti MDD Layer?

    Thank You for reading


    Tuesday, May 24, 2011 7:10 AM
  • I have done exactly the one you have mentioned before.The steps i followed are as below:

    You have to write a Custom Overcurrent Detection Driver that generates a named event when overcurrent is detected.

    Disconnect the Host once overcurrent is detected.

    Now in your application read this named event and generate a message Box.

    I hope my answer was helpful.Vote me if it was :)


    Niveth Richard

    Tuesday, March 4, 2014 12:48 PM