Skip to main content

Suspend registry settings

Wakeup Sources

The Colibri modules support to configure the events that wake up the system from suspend. The following table explains the required registry settings in [HKLM\System\PM\Suspend].

[HKLM\System\PM\Suspend]PXA270PXA300PXA310PXA320T20VF50/61Description
WakeupSources = sodimm<pin><condition>xxxxPins on SODIMM connnector
WakeupSources = pin<pin><condition>xxPins on SODIMM connector
WakeupSources = extconn<pin><condition>xxxxPins on Extension Connector (X3)
WakeupSources = gpio<io><condition>xxxxGPIOs
WakeupSources = rtcxxxxxxinternal RTC
WakeupSources = touchxxxxxtouch screen

<pin> is an SODIMM pin number
<io> is a GPIO number
<condition> is a wakeup condition defined in the table below

ConditionDescriptionPXA270PXA300PXA310PXA320T20VF50/60
rrising edgexxxxx
ffalling edgexxxxx
rfany edgexxxx
llow levelx
hhigh levelx
ttogglingx

Information about which pins support wakeup functionality can be found in the PXA Datasheet, available in the respective product page and in the article Wakeup sources.

Examples:


[HKLM\System\PM\Suspend]
"WakeupSources" = "sodimm69r,sodimm30rf"
"WakeupSources" = "extconn2r"
"WakeupSources" = "gpio0rf,gpio14rf"
"WakeupSources" = "RTC,TOUCH,pin43h"

"WakeupSources" = "rtc, touch, sodimm43rf, sodimm63rf, sodimm69rf" ; this is the default on all Colibri PXAxxx modules
"WakeupSources" = "rtc" ; this is the default on Colibri T20, Image V1.1Beta4. This is subject to change.

Real Time Clock as a Wakeup Source

The example below shows how to wake up the system at a specific time. Please note that the alarm must be set at least 11 seconds ahead of current system time. Otherwise the alarm will be ignored by the system.


BOOL SuspendResumeAfter(int sec)
{
SYSTEMTIME st;
FILETIME ft;
CE_USER_NOTIFICATION un = {0};

// add 20 seconds to the current time
GetLocalTime(&st);
SystemTimeToFileTime(&st, &ft);
(*((DWORD64*)&ft)) += 10000000 * sec; // 1 unit = 100ns
FileTimeToSystemTime(&ft, &st);

// setup alarm at least 11sec in the future
if(!CeSetUserNotification(NULL, L"", &st, &un))
return FALSE;

// enter suspend mode
if(SetSystemPowerState(NULL, POWER_STATE_SUSPEND, POWER_FORCE))
return FALSE;

return TRUE;
}

Pin Level During Suspend

The pin levels of SODIMM pins during suspend mode can be defined by registry settings.

[HKLM\System\PM\Suspend]PXA270PXA300PXA310PXA320Description
PinStates = sodimm<pin><level>xxxxPins on SODIMM connnector
PinStates = extconn<pin><level>xxxxPins on Extension connector (X3)
PinStates = gpio<io><level>xGPIOs

<pin> is an SODIMM pin number
<io> is a GPIO number
<level> is a level defined in the table below

LevelDescriptionPXA270PXA300PXA310PXA320
o0Output Lowxxxx
o1Output Highxxxx
p0pulldown 40k to 200kxxx
p1pullup 40k to 200kxxx
zhigh impedance (input)xxxx

Examples:


[HKLM\System\PM\Suspend]
"PinStates" = "sodimm55o1,sodimm63z,sodimm49p1" ; defining SODIMM pin states
"PinStates" = "extconn1o,extconn2z,extconn6p0" ; defining X3 pin states
"PinStates" = "gpio11o1,gpio16z" ; defining GPIO pin states

The default settings for Colibri PXA270 are: PCCard pins and Chipselects are set to high impedance. All other GPIOs preserve the level they had before entering suspend mode.

Timers to Change Power States

Automatic changes of the power states (e.g. transition to idle mode) is controlled by activity timers.

These timeouts are stored in the registry. They can be changed by either modifying the registry, or using the Power control panel applet. The registry values are given in seconds. There are two sets of timeouts - one for battery operation, one for AC operation.


[HKLM\System\CurrentControlSet\Control\Power\Timeouts]
"ACUserIdle" = dword:600
"ACSystemIdle" = dword:600
"ACSuspend" = dword:600
"BattUserIdle" = dword:300
"BattSystemIdle"= dword:300
"BattSuspend" = dword:300

Changing the registry values has no immediate effect. To reload the registry settings into the power manager, you need to create a particular named event, and set it:


{
...
Evt = CreateEvent(NULL, FALSE, FALSE, _T("PowerManager/ReloadActivityTimeouts"));
...
SetEvent(Evt);
...
}

PXA's internal SRAM

By default, the PXA's internal SRAM is powered off in suspend mode. In order to keep the SRAM contents through suspend, the following registry value needs to be set:


[HKLM\System\PM\Suspend]
"RetainSRAM" = dword:0 ;define SRAM Banks to be retained. Default = 0 = do not retain any SRAM

The following values are valid for RetainSRAM: CPU |Values to
retain all SRAM |Values to
power off SRAM ---------------|----------------------------:|---------------------------: PXA270 | 0x0f | 0x00 PXA300 / PXA310| 0x09 | 0x00 PXA320 | 0x3f | 0x00

Other values are possible to retain only selected memory banks. Please refer to the register description of registers PSLR (PXA270) and AD3R (PXA3xx).

Update Suspend Settings at Runtime

This feature is supported on Colibri PXA modules, but not on Colibri Tegra modules.
It is possible to make suspend registry modifications effective without reboot:
Call IOCTL_HAL_RELOADPMPARAMS to activate the latest suspend registry settings.

Send Feedback!