SiWx91x Power Manager AT Commands#
Commands#
wifisys-wake-src#
Configures the wakeup source (from sleep) for the application processor of the SiWx91x device.
Command Format#
at+wifisys-wake-src=<source>,<add>
Related SDK API
sl_si91x_configure_wakeup_sources
Pre-conditions#
A peripheral designated as the wakeup source (for example, Calendar) should be configured before sending this command.
A Calendar or ULP Timer wakeup source is usually configured before sending this command and started after sending this command.
See the Calendar AT commands for starting an alarm with the Calendar peripheral.
Parameters#
source#
A numeric value specifying the wakeup source.
add#
Set to 1 or 0 to add or remove the wakeup source indicated in the source
parameter.
Response#
OK
on successERROR <error code>
case of failure. Possible error codes are the same as those returned by the sl_si91x_configure_wakeup_sources API.
Notes#
Wakeup Sources. Currently supporting only SL_SI91X_POWER_MANAGER_ALARM_WAKEUP source.
Examples#
// Add the wakeup source
at+wifisys-wake-src=0x4000000,1
wifisys-psreq#
Configures the power state requirements of the application processor of the SiWx91x device.
Command Format#
at+wifisys-psreq=<state>,<add>
Related SDK APIs
Pre-conditions#
Parameters#
state#
The power state requirement to be added or removed. Contains a numeric value that corresponds to one of the sl_power_state_t enum values.
add#
Set to 1 or 0 to add or remove the requirement indicated in the state
parameter.
Response#
OK
on successERROR <error code>
in case of failure. Possible error codes are the same as those returned by the sl_si91x_power_manager_add_ps_requirement, sl_si91x_power_manager_remove_ps_requirement APIs.
sl_si91x_power_manager_init, sl_si91x_power_manager_add_ps_requirement, or sl_si91x_power_manager_get_requirement_table API.
Notes#
If the Power Manager service on the SiWx91x device is not already initialized, it will be initialized first by invoking the
sl_si91x_power_manager_init
API.If
add
is set to 1, thesl_si91x_power_manager_add_ps_requirement
API is invoked; otherwise, sl_si91x_power_manager_remove_ps_requirement is invoked.The SiWx91x application processor will immediately transition to the specified power state if it is valid and
add
is set to 1.
Examples#
// Transition to the PS0 power state
at+wifisys-psreq=0,1
wifisys-psreq?#
Queries the current power state requirements of the application processor of the SiWx91x device.
Command Format#
at+wifisys-psreq?
Related SDK API
sl_si91x_power_manager_get_requirement_table
Pre-conditions#
Parameters#
None
Response#
OK <ps0> <ps1> <ps2> <ps3> <ps4>
in case of success, where<psN>
is an integer value specifying the requirements for the corresponding power state.ERROR <error code>
in case of error. Possible error codes are the same as those returned by the sl_si91x_power_manager_get_requirement_table API.
Notes#
If the Power Manager service on the SiWx91x device is not already initialized, it will be initialized first by invoking the sl_si91x_power_manager_init API.
Examples#
at+wifisys-psreq?
OK 1 0 0 0 0
wifisys-ps?#
Queries the current power state of the application processor of the SiWx91x device.
Command Format#
at+wifisys-ps?
Related SDK API
sl_si91x_power_manager_get_current_state
Pre-conditions#
Parameters#
None
Response#
OK <state>
in case of success, where<state>
is the current power state (for example, PS0) of the SiWx91x device, populated with a numeric value corresponding to one of the values of the enum sl_power_state_t.ERROR <error code>
in case of error. Possible error codes are the same as those returned by the sl_si91x_power_manager_get_current_state API.
Notes#
If the Power Manager service on the SiWx91x device is not already initialized, it will be initialized first by invoking the sl_si91x_power_manager_init API.
Examples#
at+wifisys-ps?
OK 0
wifisys-sleep#
Places the SiWx91x device into a sleep state where it waits for a wakeup source.
Command Format#
at+wifisys-sleep
Related SDK API
Pre-conditions#
Parameters#
None
Response#
OK
in case of success,ERROR <error code>
in case of error. Possible error codes are the same as those returned by the sl_si91x_power_manager_sleep API.
Notes#
If the Power Manager service on the SiWx91x device is not already initialized, it will be initialized first by invoking the sl_si91x_power_manager_init API.
Examples#
at+wifisys-sleep
wifisys-standby#
Places the SiWx91x device into a standby state where it waits for an interrupt.
Command Format#
at+wifisys-standby
Related SDK API
sl_si91x_power_manager_standby
Pre-conditions#
Parameters#
None
Note#
If the Power Manager service on the SiWx91x device is not already initialized, it will be initialized first by invoking the sl_si91x_power_manager_init API.
Response#
OK
on successERROR <error code>
in case of error. Possible error codes are the same as those returned by the sl_si91x_power_manager_standby API.
Examples#
at+wifisys-standby
Events#
WIFISYS_PS_TRANSITION#
Event message sent by the SiWx91x device when a transition occurs between two power states.
Event Message Format#
at+WIFISYS_PS_TRANSITION=<from-state>,<to-state>
Related SDK API
Callback type sl_power_manager_ps_transition_on_event_t
Parameters#
from-state#
The previous power state that the SiWx91x device has moved out of. Contains a numeric value that corresponds to one of the values of the enum sl_power_state_t
. See the sl_power_state_t documentation for possible values.
to-state#
The current power state that the SiWx91x device has moved into. Contains a numeric value that corresponds to one of the values of the enum sl_power_state_t.
Examples#
// Transition occurred from PS0 to PS1
at+WIFISYS_PS_TRANSITION=0,1