Re: Disable the suspend mode of USB host
From: Seung Yi (seungyi_at_codetelligence_NOSPAMMERS_.com)
Date: 08/17/04
- Next message: Daniel Becker: "Re: unresolved external symbol WinMain ??"
- Previous message: Peter: "Re: EBOOT SMSC91C113L Ethernet registers not accessible"
- In reply to: Frank Chen: "Disable the suspend mode of USB host"
- Next in thread: Frank Chen: "Re: Disable the suspend mode of USB host"
- Reply: Frank Chen: "Re: Disable the suspend mode of USB host"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 17 Aug 2004 10:49:22 -0700
Frank Chen wrote:
> I found this discussion from the microsoft.public.windowsce.embedded group
> through google search and it is related to our development problems.
>
> When I plug in the USB device to the Pocket PC running Windows CE.net 4.2,
> at the first the USB device gets enumerated correctly, than after 2 or 3
> seconds, it seems going into suspend mode. When there are attempt trying to
> write or read from the USB device, the device LED indicating that the it
> resumed while the read data is not correct. As soon as the data IO finished,
> it goes SUSPEND mode immediately.
>
> How can I disable the USB bus suspend function to my device so that the
> device is always ready for the data IO?
>
> Is any way to ask the USB bus return to power FULL ON mode before the USB
> device doing the data IO?
>
>
>
> We are using eV++ 4.0 for developing the USB driver and CE application even
> though we have a license of PB 4.1
>
> Thank you for the help,
>
> Frank Chen
>
> ----------------------------------------------------------------------------
>
> Are you talking about USB bus states or Windows CE power states. I assume
>
> you mean CE power states.
>
> If your client driver exposes a stream interface (by calling
>
> ActivateDevice() on itself) it will receive PowerUp()/PowerDown() callbacks
>
> just like any other driver. I'm not sure what's in the CE 3.0 distribution,
>
> but the USB printer driver does this -- check out USBDeviceAttach() in
>
> public\common\oak\drivers\usb\class\printer (the path may be slightly
>
> different in 3.0).
>
> Note that the operations you can carry out in a device driver are greatly
>
> restricted in power callbacks. In particular, you can't issue USB
>
> transfers, write the registry, or make most API calls. Also, your device is
>
> likely to get unloaded and reloaded as soon as the system resumes.
>
> Hope this helps,
>
> Andrew Pearson
>
> --
>
> To reply directly, remove "online." from my email address.
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>
>
>
> "k.kasama" <XBN00421@nifty.com> wrote in message
>
> news:090701c29d08$feb1a770$d5f82ecf@TK2MSFTNGXA12...
>
>
>>I am developping USB client driver for Windows CE3.0.
>
>
>>Is there method to detect a transition from On/Idle state
>
>
>>to Suspend state?
>
>
>
>>Regards,
>
>
>
>
>
>
>
You can check the system - to- power state mapping in the registery and
check to see if the USB host controller has a specific device power
state mapping (it would have an entry for something like HCD1:).
See: HKLM\SYSTEM\CurrentControlSet\Control\Power\State
I am assuming that the 2-3 second suspen, may be a result of user Idle
system power state causing the power manager to broadcast a power state
lower than D0 to devices in particular the USB host controller. You
could experiment by forcing power state mappings to keep HCD1: at D0 all
the time.
As for an API, there is no USBD API in CE.4.2 to tell the host
controller to keep the USB bus from entering suspend. In CE 5.0,
drivers can selectively suspend/resume their device.
-- Seung Yi Senior Engineer Codetelligence, Inc. Web : www.codetelligence.com
- Next message: Daniel Becker: "Re: unresolved external symbol WinMain ??"
- Previous message: Peter: "Re: EBOOT SMSC91C113L Ethernet registers not accessible"
- In reply to: Frank Chen: "Disable the suspend mode of USB host"
- Next in thread: Frank Chen: "Re: Disable the suspend mode of USB host"
- Reply: Frank Chen: "Re: Disable the suspend mode of USB host"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|