Author Topic: Suspend/resume  (Read 8911 times)

Mats

  • Member
  • ***
  • Posts: 1
Suspend/resume
« on: September 15, 2011, 07:48:40 am »
We are developing a USB device that is bus powered.
We have two strange PC suspend/resume behaviors.

1: The host wakes us up just before going to sleep.
Sniffing the bus we get the following:
<suspend> (~250ms long)
(~900ms)
<host disconnected>
(~0.8ms)
<host connected>
(~4ms)
<reset>
PC goes to sleep.
We still get a <reset> when resuming the PC so we are able to handle the wakeup,
but this behavior means that our device isn't in suspend

2: (not the same PC):
<suspend> We suspend
PC goes to sleep
<resume> We wake up
<suspend> We suspend, again
<resume> We wake up, again

We can probably live these behaviors but I would like to know if this can be considered
normal host behavior and also if there are other 'strange' suspend/resume behaviors.

There seems to be different ways to handle the S3 ACPI state (standby/sleep), some PCs keep Vbus on while others sets Vbus off.
Is this a gray area or are both behaiors correct?

/Mats

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Suspend/resume
« Reply #1 on: September 15, 2011, 10:25:08 am »
The short answer is that devices don't need to know or care why the host does things. They just need to respond to what happens on the bus.

According to the ACPI standard, in the S1 state, the bus is suspended and VBUS is on. In S3, the bus is suspended and VBUS is on for newer systems and off for older ones.

Standby can be S3 but some systems use S1 due to problems with S3 in some BIOSes and hardware.

System settings in control panel > power options or power schemes can control the states.

Jan