Share via


Best Practices for Faster Suspend Times (Windows CE 5.0)

Send Feedback

You can configure the system to return from PowerOffSystem, and then go right back to sleep if the battery was critically low. Only after passing the battery level test would devices that consumed significant power be turned on in the Power Manager.

The following list shows some configurations to make to achieve faster suspend times:

  • After suspend is initiated, ignore the suspend button until a PBT_RESUME notification arrives.

  • Allow all drivers that consume a significant amount of power to be manageable through the Power Manager; the XXX_PowerUp (Device Manager) and XXX_PowerDown (Device Manager) callbacks need not do anything significant with respect to power consumption.

  • In the battery driver, implement the cache flag in the GetSystemPowerStatusEx2 function.

  • Choose a high enough battery critical level so that the system does not brown out unexpectedly if a device is powered on.

  • Enhance the Power Manager code that calls PowerOffSystem to be smarter about battery level.

    The following pseudo-code example shows this Power Manager code before the enhancements.

    PowerOffSystem();
    Sleep(0);
    

    The following pseudo-code example shows this Power Manager code after the enhancements. This example does not include any hardware platform specific modifications.

    do {
      PowerOffSystem();
      Sleep(0);
      GetSystemPowerStatusEx2(&status, TRUE); // force value refresh
    } while(status.battery_is_critical && status.ac_power_not_available);
    

See Also

Best Practices for Developing a Device Driver

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.