sleep and wake-up from suspend/hibernate

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply

sleep and wake-up from suspend/hibernate

Post by Valery » Thu Feb 07, 2008 5:07 pm

Have anybody a working algorythm for suspend state handling with ObDev USB solution ?

I've searched a bug, i.e. all of my controllers stays invisible when the PC host wakes-up from suspend or hibernate state and I must to reconnect usb cable for device detection.

Due the some reasons thats looks like host simple disconnect device coz device has abnormal power consumptions during host's suspend mode.

I've tried to put the MC into the sleep for reduce power consumption, but MC simple wan't to wake-up after this :-(

Are there any ideas ?


Post by Guest » Thu Feb 07, 2008 5:34 pm


I had that problem with PowerSwitch too, because while booting, the PC cut-off the power to USB for a moment. I solved it by making sure that the USB device forced a reenumeration by pulling both data lines to low for at least 500ms.


Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Thu Feb 07, 2008 6:18 pm

Your problem may have several causes:

(1) Make sure that you force a disconnect for at least 250 ms during power-up of the controller. Newer versions of PowerSwitch already do that.

(2) Some versions of libusb-win32 crash when Windows goes into sleep mode. The USB interface becomes unusable after this type of crash. Make sure you have a version which does not suffer this bug.

(3) It's rare that hosts really check the power consumption during sleep mode (I know no such example). But if it's really enforced, see the USB2LPT project for an example how to detect sleep mode and reduce power consumption.


Post by Valery » Thu Feb 07, 2008 7:05 pm

Thanx for helping.

Have a nice day !

Post Reply