Author Topic: Circumventing power suspension  (Read 784 times)

Doug D.

  • Member
  • ***
  • Posts: 16
Circumventing power suspension
« on: July 26, 2018, 01:47:45 pm »
Hello Jan,

I am designing a vendor-defined, custom HID-Class, USB 2.0 full-speed device and have a question about power suspension.  My device is powered by the USB bus.  It draws less than 100mA initially, but after USB enumeration it needs about 300mA to function.  The problem is that if the USB host tries to suspend it, the device can't reduce current consumption while still performing its primary purpose.

Can I get around the inability to suspend by using a self-powered hub for power, rather than the host PC?  What issues might a device face in this situation--by continuing to draw 300mA after being told to suspend?  This device does not require USB certification.

Thanks,
Doug

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 2803
    • Lakeview Research
Re: Circumventing power suspension
« Reply #1 on: July 27, 2018, 09:27:00 am »
Instead of relying on a self-powered hub, why not use self power? Instead of a hub, power supply, and a USB cable for the hub, you would need only a power supply.

In general, it's best to work within the USB specs rather than circumventing them with unpredictable results when there is a new OS, driver, etc.

Doug D.

  • Member
  • ***
  • Posts: 16
Re: Circumventing power suspension
« Reply #2 on: July 27, 2018, 10:40:21 am »
Those are very good points--I'm convinced.  I guess I had it in mind to take advantage of the USB bus's ability to provide power, but since I can't suspend like a mouse or keyboard, I agree that self-power is a better solution.  Fortunately, I have to make some board changes anyway, so this is a good time to incorporate self-power.

Thank you very much.

Bret

  • Frequent Contributor
  • ****
  • Posts: 66
Re: Circumventing power suspension
« Reply #3 on: July 27, 2018, 07:16:06 pm »
The other potential issue is that even if your device is not directly suspended, one of the upstream Hubs (or the Host) it is attached to can be suspended.  When that happens, you'll lose power and the USB bus will stop working.  It's usually not a good idea to design a device that requires attachment to a self-powered hub since that's an external factor you can't control.

Doug D.

  • Member
  • ***
  • Posts: 16
Re: Circumventing power suspension
« Reply #4 on: July 28, 2018, 11:48:02 am »
The other potential issue is that even if your device is not directly suspended, one of the upstream Hubs (or the Host) it is attached to can be suspended.  When that happens, you'll lose power and the USB bus will stop working.  It's usually not a good idea to design a device that requires attachment to a self-powered hub since that's an external factor you can't control.

Thanks Bret.