How can you know if Selective Suspend has happened

Short version: I have a 3rd part device& driver (USB) that I do not know if is supports selective suspend. Contacting the company is not much help (tried it). Is there some way to determine if the device supports SSuspend. An additional question is: Is there some way to know if this has happened?

Long version:
I am working with a device made by a third party. I won’t name the company, but their initials are N.I. Their USB DAQ board is connected to a device that we have made. Our device is getting too hot while sitting idle and not being used. I want to know if I can determine if the USB Port has suspended while this device is connected. I also want to know if our User Mode application which is using the device, is causing the device to think it is not idle and therefore not allowing Selective suspend of the port.

I’m thinking I will have the user mode code close all handles to the driver so that the device thinks (rightly) that it is idle. But I need a way to test/measure that a selective suspend has or hasn’t happened.

One route I have considered:
I do have a USB analyzer at my disposal here, but I am not sure what I would be looking for in the tracing.

Thanks

Rick

xxxxx@gnotometrics.com wrote:

Long version:
I am working with a device made by a third party. I won’t name the company, but their initials are N.I. Their USB DAQ board is connected to a device that we have made. Our device is getting too hot while sitting idle and not being used.

This is going off on a bit of a tangent, but how would the suspended
state of an external DAQ board affect your device’s power draw? I don’t
see how the two are necessarily related.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

ONE thing to look for is if there are requests continually oustanding to the device. Do you see the host controller constantly polling the device?

if so, the device is definitely not asleep…

Peter
OSR

Good question… the hardware guys have tapped into the USB power to provide juice to other parts. So, if the port suspends, the USB power goes away and the components which are heating up are no longer getting power.

Make sense?

It is even easier, USB analyzers display suspend in the traces. Some (CATC) as separate suspend and resume states.

BTW, polling isn’t completely reliable indication, there may not be a request queued and there is no polling. SOFs are better, when port is alive, there is SOF every ms.

Michal

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-446727-
xxxxx@lists.osr.com] On Behalf Of xxxxx@osr.com
Sent: Friday, March 25, 2011 11:55 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] How can you know if Selective Suspend has happened

ONE thing to look for is if there are requests continually oustanding to the
device. Do you see the host controller constantly polling the device?

if so, the device is definitely not asleep…

Peter
OSR


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

NOTE: The information in this message is intended for the personal and confidential use of the designated recipient(s) named above. To the extent the recipient(s) is/are bound by a non-disclosure agreement, or other agreement that contains an obligation of confidentiality, with AuthenTec, then this message and/or any attachments shall be considered confidential information and subject to the confidentiality terms of that agreement. If the reader of this message is not the intended recipient named above, you are notified that you have received this document in error, and any review, dissemination, distribution or copying of this message is strictly prohibited. If you have received this document in error, please delete the original message and notify the sender immediately.
Thank You!
AuthenTec, Inc. http://www.authentec.com/

No. When port suspends, USB power doesn’t go away. However, there is a limitation how much power can the device draw. I don’t remember exactly, it is few mA (3?). Look to USB specs for exact number.

Michal

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-446728-
xxxxx@lists.osr.com] On Behalf Of xxxxx@gnotometrics.com
Sent: Friday, March 25, 2011 11:57 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] How can you know if Selective Suspend has happened

Good question… the hardware guys have tapped into the USB power to
provide juice to other parts. So, if the port suspends, the USB power goes
away and the components which are heating up are no longer getting power.

Make sense?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

NOTE: The information in this message is intended for the personal and confidential use of the designated recipient(s) named above. To the extent the recipient(s) is/are bound by a non-disclosure agreement, or other agreement that contains an obligation of confidentiality, with AuthenTec, then this message and/or any attachments shall be considered confidential information and subject to the confidentiality terms of that agreement. If the reader of this message is not the intended recipient named above, you are notified that you have received this document in error, and any review, dissemination, distribution or copying of this message is strictly prohibited. If you have received this document in error, please delete the original message and notify the sender immediately.
Thank You!
AuthenTec, Inc. http://www.authentec.com/

Rick said …

Good question… the hardware guys have tapped into the USB power to provide juice to other parts. So, if the port suspends, the USB power goes away and the components which are heating up are no longer getting power.

That is indeed, well, unfortunate and a recipie for brownouts due to onrush current drops as well as introducing EMI spikes. Basically, image a garden hose supplying a sprinkler head in your yard. You’ve moved the sprinker around and adjusted things so that with the hose running you water just the spots you want on your lawn – not too much so it waters the sidewalk, not so little that the head doesn’t move or no water comes out. That’s what the chip manufacturers do with your USB chip – you supply it the correct current at the correct voltage, it does the right thing at the right temperature … you can look at the datasheets what is called the brownout voltage and current limit, which tells you at what point the device will stop working properly.

Now, imagine that you add a Y-connector to your hose and attach a soaker hose to that – now, when you turn on the water only a little bit of water goes to your sprinkler at the beginning, then as the soaker fills up the flow gets back to 'kinda normal. You will see your sprinkler barely start turning, maybe sputter for a bit before at some random time it will spring to life. The same thing happens when you hang something on the power circuit (called a “sneaker circuit”, BTW). Power starts flowing, your USB chip 'kinda starts to work, pins 'kinda move but it’s a little while before things really get moving. Meanwhile your driver is trying to communicate with this suddenly flaky chip with some really whacky timing and you wonder why you’re getting heisenbugs.

Even worse, imagine that the sneaker hose is one of those impulse sprinklers, the ones that blast out spurts at intervals. Now your sprinkler suddenly starts having “lags” when the water just doesn’t quite make it where it needs to go, at apparently random intervals. What this means for your chip is that you will see sporadic brownout resets, where the chip (once the current/ voltage drops too far) will reset seemingly spontaneously … yet another heisenbug.

This is why a lot of current USB DVD’s have two USB connectors; one for the power and one for the USB connection – that way you can still have USB drive the hardware but you don’t mess up the USB chip with a sneaker circuit. I would really, strongly encourage your HW fellows to investigate putting a separate USB-B header on the board and use that for power rather than what the chip is needing …

Cheers!

Without an analyzer, you can determine if a device’s driver is doing
selective suspend by running “powercfg /energy” (elevated) in Win7 and
setting things up such that you think the device should suspend. It
will give you an error on the device if it never went to suspend in 60
seconds.

You could also use USB ETW, but powercfg is simpler to use.

On 3/25/2011 4:47 PM, Vodicka, Michal wrote:

No. When port suspends, USB power doesn’t go away. However, there is a limitation how much power can the device draw. I don’t remember exactly, it is few mA (3?). Look to USB specs for exact number.

Michal

> -----Original Message-----
> From: xxxxx@lists.osr.com [mailto:bounce-446728-
> xxxxx@lists.osr.com] On Behalf Of xxxxx@gnotometrics.com
> Sent: Friday, March 25, 2011 11:57 PM
> To: Windows System Software Devs Interest List
> Subject: RE:[ntdev] How can you know if Selective Suspend has happened
>
> Good question… the hardware guys have tapped into the USB power to
> provide juice to other parts. So, if the port suspends, the USB power goes
> away and the components which are heating up are no longer getting power.
>
> Make sense?
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

NOTE: The information in this message is intended for the personal and confidential use of the designated recipient(s) named above. To the extent the recipient(s) is/are bound by a non-disclosure agreement, or other agreement that contains an obligation of confidentiality, with AuthenTec, then this message and/or any attachments shall be considered confidential information and subject to the confidentiality terms of that agreement. If the reader of this message is not the intended recipient named above, you are notified that you have received this document in error, and any review, dissemination, distribution or copying of this message is strictly prohibited. If you have received this document in error, please delete the original message and notify the sender immediately.

Thank You!

AuthenTec, Inc. http://www.authentec.com/