Suspend State (Windows Embedded CE 6.0)
1/5/2010
When a device is asked to suspend, it is being asked to remain powered to the point that RAM is in a self-refresh state where an interrupt can wake the device. The suspend process can occur in three ways:
- The keyboard driver issues a VK_OFF to GWES. This eventually causes GwesPowerOffSystem to be called.
- The OEM can call GwesPowerOffSystem directly.
- The OEM can call SetSystemPowerState.
The GwesPowerOff function performs key operations before a device can suspend.
To suspend a device
Notify the Taskbar that the device is being suspended.
Post the WM_POWERBROADCAST message with the flag PBT_APMSUSPEND. Only the registered Taskbar will get this message.
Abort calibration if the calibration screen is up and in one of the following states:
- Waiting at cross hairs.
- If calibration was waiting at confirmation.
Turn off window message queues, stopping the processing of messages.
Determine if the Startup UI screen needs to appear on resume.
Save video RAM to system RAM is necessary to preserve state on resume.
Call SetSystemPowerState with the arguments (NULL, POWER_STATE_SUSPEND, POWER_FORCE). This calls into the power manager that coordinates the rest of the suspend operation. At this point, GwesPowerOff is not completed until the system resumes.
Power manager performs the following actions:
- Calls FileSystemPowerFunction(FSNOTIFY_POWER_OFF) to power off file system drivers.
- Calls PowerOffSystem.
- Calls Sleep(0) to allow the kernel scheduler to run and perform the final suspend process.
The kernel performs the following final steps to suspend:
- Power off GWES process.
- Power off Filesys.exe.
- If this is an SHx microprocessor, call OEMFlushCache.
- Call OEMPowerOff.