Limit current provided by USB host

  • Hello Support-Team,


    Is it possible to configure the USB host functionality in a way so that only one bus-powered USB device is enumerated which claims a maximum current of 100 mA and rejects USB devices which ask for more current?


    Background: We use a battery driven efusA9X board with WEC2013 and want to limit the current provided by the USB port to avoid that USB devices deplete the battery too fast.

    The device supports the USB classes mass-storage and printer.


    In this context I have noticed that the USB host at our device does not support external hubs (self made kernel). I'm wondering if it is possible to add support of hubs? I have found no appropriate catalog item to do so.


    Best regards,

    Habi

  • Hello,


    >> ... 100 mA and rejects USB devices which ask for more current?

    << Overcurrent detection by the CPU can only be done in the context of USB Specification Revision 2.0. So i asume you Need additional HW.


    >> In this context I have noticed that the USB host at our device does not support external hubs

    << Should work out of the box. Did it help to set: HKLM\Drivers\Builtin\HCD_HSH<your>\PhysicalPageSize=dword:40000 or higher?

    PS: can you test this on a SKIT with Standardkernel and your HUB?

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Quote

    >> ... 100 mA and rejects USB devices which ask for more current?

    << Overcurrent detection by the CPU can only be done in the context of USB Specification Revision 2.0. So i asume you Need additional HW.

    I'm rather thinking about a software solution. Windows manages the total current of USB ports by evaluating the current information provided during enumeration. E.g, if a bus-powered USB hub is connected to which in turn several bus-powered USB devices are connected. In this case Windows would reject devices if the total sum of current the devices claim to require gets greater than 500 mA. As far as I know this is not done via the overcurrent detection realized in hardware.

    My idea was to decrease the software limit from 500 mA to 100 mA via registry setting or something like that.


    Regarding the problem with the hub:

    The hub I used for my first test do not work, which means a USB stick connected via this hub is not recognized by the efus-board. Setting PhysicalPageSize as suggested didn't change anything. But other hubs work as expected (even without increasing PhysicalPageSize). For my first test I picked the only USB-hub we have in the company which do not work :-)

    The hub which is not working is the D-Link DUB-H7. I can live with that, using a hub is not a use-case in this project.