Device Power

Windows CE .NET

Device Power state definitions are statically predefined. The Power Manager passes a device state to a driver and the driver is responsible for mapping the state to its device capabilities and then performing the applicable state transition on its physical device.

The following table specifies the device power states, and their descriptions.

Device power state Registry key Description
Full on D0 State in which the device is on and running. It is receiving full power from the system and is delivering full functionality to the user.
Low on D1 State in which the device is fully functional at a lower power or performance state than D0. D1 is applicable when the device is being used, but where peak performance is unnecessary and power is at a premium.
Standby D2 State in which the device is partially powered with automatic wakeup on request. A device in state D2 is effectively standing by.
Sleep D3 State in which the device is partially powered with device-initiated wakeup if available. A device in state D3 is sleeping but capable of raising the System Power State on its own. It consumes only enough power to be able to do so; which must be less than or equal to the amount of power used in state D2.
Off D4 State in which the device has no power. A device in state D4 should not be consuming any significant power. Some peripheral busses require static terminations that intrinsically use non-zero power when a device is physically connected to the bus; a device on such a bus can still support D4.

A physical device does not have to support all of the device power states. The only device power state that all devices must support is the full on state, D0. A driver that is issued a request to enter a power state not supported by its device enters the next available power state supported. For example, if the Power Manager requests that it enter D2 and does not support D2, the device can enter D3 or D4 instead. This can be done if the Power Manager supports one of these states. If a device is requested to enter D3 and cannot wake up the system then it should enter D4 and power off rather than staying in standby. These rules are intended to simplify driver implementation.

The Power Manager appropriately maps system power states to the corresponding device power states. For example, if a device only supports device power states D0 and D4, the Power Manager will not immediately request that the device enter the D4 power state. The Power Manager waits until the system enters a system power state in which D3 or D4 is configured as the maximum device power state for that device. If D0, D1, or D2 is configured as the maximum power state, the Power Manager will keep the device at D0.

When a device driver is loaded it should put the device into full on, D0. Before a driver is unloaded, if possible, it should put the device into off, D4. If a device enters another device power state at startup, it can issue a DevicePowerNotify request while processing IOCTL_POWER_CAPABILITIES.

See Also

Device Power Capabilities

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.