XAPS - Power Saving Mode
Configures the device Power Saving Mode (PSM). When active, the device enters a low-power sleep state and wakes up periodically or on configured events.
Format
- Query PSM config:
>QXAPS< - Disable PSM:
>SXAPSE< - Enable PSM:
>SXAPSA[EXTPWR][INPUTS][MOTION][SLEEP_TIME][WAKE_TIME]< - Immediate sleep:
>SXAPSI< - Query LPM-with-time flag:
>QXAPSM< - Set LPM-with-time flag:
>SXAPSM[x]< - Response (disabled):
>RXAPSE< - Response (enabled):
>RXAPSA[EXTPWR][INPUTS][MOTION][SLEEP_TIME][WAKE_TIME]< - Response (LPM-with-time):
>RXAPSM[x]<
| Field | Values | Description |
|---|---|---|
EXTPWR | 0 or 1 | Wake on external power restore |
INPUTS | 0 or 1 | Wake policy based on digital inputs |
MOTION | 0 or 1 | Wake on accelerometer motion |
SLEEP_TIME | 4 digits | Time before entering sleep (minutes) |
WAKE_TIME | 4 digits | Wake-up interval (minutes) |
x | 0 or 1 | LPM-with-time: 1 enables timed wake-up on low-battery PSM, 0 disables it |
Examples
Configure PSM: sleep after 60 minutes, wake every 300 minutes, wake on motion:
>SXAPSA10100600300<
| Value | Meaning |
|---|---|
1 | Wake on external power |
0 | Do not wake on inputs |
1 | Wake on motion |
0060 | Sleep after 60 minutes |
0300 | Wake every 300 minutes |
Query PSM state:
>QXAPS<
>RXAPSA10100600300<
Disable PSM:
>SXAPSE<
Force immediate sleep:
>SXAPSI<
Enable low-battery PSM with timed wake-up:
>SXAPSM1<
Disable low-battery PSM timed wake-up (immediate shutdown on low battery):
>SXAPSM0<
Query LPM-with-time flag:
>QXAPSM<
>RXAPSM1<
Low-Battery PSM Modes
When the battery falls below the critical threshold and no external power is connected, the device enters Power Saving Mode automatically. The PSM configuration used depends on the LPM-with-time flag:
>SXAPSM[x]< | Configuration | Behaviour |
|---|---|---|
0 (default) | PSM_LOW_BATT_CONFIG (0x201) | Device shuts down; no scheduled wake-up |
1 | PSM_LOW_BATT_CONFIG_WITH_TIME (0xA0201) | Device enters LPM with timed wake-up capability |
The flag is stored persistently and survives reboots.
Related Signals
| Signal | Description |
|---|---|
G15 | PSM scheduled |
G16 | PSM canceled |
F11 | PSM session ended (wake-up) |
F13 | External power present |
Defaults and Limits
- Uses mode flags (
A,E,I,M) and fixed-width schedule fields. - Time fields are encoded as 4-digit values.
- Default LPM-with-time flag is
0(disabled).