Introduction
The Wi-Fi STA power-saving modes defined in the IEEE 802.11 specification include the following key features:
Enter doze state when no data is being sent or received.
enter awake state for receiving AP beacon frame
Utilizes beacon TIM (Traffic Indication Map) for data management
During the station’s sleep period, it cannot receive any data frames. Therefore, the AP must buffer any pending frames, and the STA must periodically wake up to check for beacon frames.
The Wi-Fi timeline of power-saving mode is illustrated below:
Based on the above standard IEEE 802.11 power saving mechanism, the Ameba SoC provides three Wi-Fi power-saving modes:
Mode |
Full name |
Description |
|---|---|---|
IPS |
Inactive Power Save |
Implements a complete power-down state when not connected. |
LPS |
Legacy Power Save |
Switches between awake and doze states under Wi-Fi connection, periodically turns the transceiver on or off for power saving. |
WoWLAN |
Wake on Wireless LAN |
Allows the SoC system to enter Sleep Mode while maintaining Wi-Fi connectivity. The system can be woken up by unicast packets, broadcast/multicast packets (optional), or AP disconnect event. |
IPS Mode
The IPS (Inactive Power Save) mode is specifically designed for scenarios where the device is not connected to a Wi-Fi network. It enables the device to enter a sleep state during periods of inactivity, thereby significantly extending battery life.
IPS generally supports two distinct sleep level:
Wi-Fi Power Off: In this state, the Wi-Fi module is completely powered down to achieve maximum power savings.
Power Gating (PG) Mode: This state utilizes power gating techniques, which allows for a much faster exit from IPS mode upon wakeup.
Programming Interface
Ameba Wi-Fi controls the IPS behavior using the wifi_set_ips_internal() function and a set of related parameters. The IPS control flow is depicted below:
Parameter |
Type |
Value |
Description |
Default |
|---|---|---|---|---|
ips_enable |
u8 |
0/1 |
Disable/Enable IPS |
1 |
ips_level |
u8 |
RTW_IPS_WIFI_OFF |
Wi-Fi power off in IPS |
RTW_IPS_WIFI_OFF |
RTW_IPS_WIFI_PG |
Wi-Fi power gating in IPS |
|||
ips_ctrl_by_usr |
u8 |
0 |
Enable/Disable IPS via API |
0 |
1 |
Enter/Exit IPS mode via API |
Parameter |
Type |
Value |
Description |
Default |
|---|---|---|---|---|
ips_enable |
u8 |
0/1 |
Disable/Enable IPS |
1 |
ips_level |
u8 |
RTW_IPS_WIFI_OFF |
Wi-Fi power off in IPS |
RTW_IPS_WIFI_OFF |
RTW_IPS_WIFI_PG |
Not Support |
|||
ips_ctrl_by_usr |
u8 |
0 |
Enable/Disable IPS via API |
0 |
1 |
Enter/Exit IPS mode via API |
Parameter |
Type |
Value |
Description |
Default |
|---|---|---|---|---|
ips_enable |
u8 |
0/1 |
Disable/Enable IPS |
1 |
ips_level |
u8 |
RTW_IPS_WIFI_OFF |
Wi-Fi power off in IPS |
RTW_IPS_WIFI_OFF |
RTW_IPS_WIFI_PG |
Not Support |
|||
ips_ctrl_by_usr |
u8 |
0 |
Enable/Disable IPS via API |
0 |
1 |
Enter/Exit IPS mode via API |
Parameter |
Type |
Value |
Description |
Default |
|---|---|---|---|---|
ips_enable |
u8 |
0/1 |
Disable/Enable IPS |
1 |
ips_level |
u8 |
RTW_IPS_WIFI_OFF |
Wi-Fi power off in IPS |
RTW_IPS_WIFI_OFF |
RTW_IPS_WIFI_PG |
Not Support |
|||
ips_ctrl_by_usr |
u8 |
0 |
Enable/Disable IPS via API |
0 |
1 |
Enter/Exit IPS mode via API |
Parameter |
Type |
Value |
Description |
Default |
|---|---|---|---|---|
ips_enable |
u8 |
0/1 |
Disable/Enable IPS |
1 |
ips_level |
u8 |
RTW_IPS_WIFI_OFF |
Wi-Fi power off in IPS |
RTW_IPS_WIFI_OFF |
RTW_IPS_WIFI_PG |
Not Support |
|||
ips_ctrl_by_usr |
u8 |
0 |
Enable/Disable IPS via API |
0 |
1 |
Enter/Exit IPS mode via API |
Refer to the table below for the behavior of each combination:
ips_enable |
ips_ctrl_by_usr |
wifi_set_ips_internal |
Behavior |
|---|---|---|---|
0 |
0 |
Y |
Dynamically enables/disables IPS.
|
0 |
1 |
Y |
IPS is disabled. |
0 |
X |
N |
IPS is disabled. |
1 |
0 |
Y |
Dynamically enables/disables IPS.
|
1 |
1 |
Y |
Dynamically enter/exit IPS mode.
|
1 |
X |
N |
IPS is enabled.
|
LPS Mode
The core idea of LPS (Legacy Power Save) mode is to allow a client station (STA) to enter a low-power sleep state while associated with an Access Point (AP) but with no active data traffic. During this sleep period, the AP buffers any incoming downstream data intended for the STA, thus conserving the STA’s power.
An STA operating in LPS mode must periodically wake up to listen for beacon frames broadcast by the AP. By examining the Traffic Indication Map (TIM) element within these beacons, the STA can determine if the AP has buffered data for it. If the TIM indicates that data is pending, the STA will remain awake to communicate with the AP and retrieve the buffered frames. Otherwise, it can return to sleep until the next scheduled wakeup.
Parameter |
Type |
Value |
Description |
Default |
|---|---|---|---|---|
lps_enable |
u8 |
0 / 1 |
Disable/Enable LPS |
1 |
lps_listen_interval |
u8 |
0 |
Wakes up at each Target Beacon Transmission Time (TBTT) to receive the beacon frame. |
0 |
> 0 |
Configure the interval for receiving beacon frames, unit: 102.4ms (TBTT interval) |
WoWLAN Mode
WoWLAN (Wake on Wireless LAN) is a system-level power-saving mode where the system enters the Power-Saving Mode—Sleep Mode when idle, while still maintaining the Wi-Fi connection.
In WoWLAN mode, Wi-Fi events can act as a wake-up source to wake up the system:
Receipt of a targeted unicast packet.
Receipt of a broadcast or multicast packet.
An Access Point (AP) disconnection event.
To provide developers with granular control, we offer a configuration option to specify whether incoming broadcast and multicast packets should trigger a system wake-up.
Parameter |
Type |
Value |
Description |
Default |
|---|---|---|---|---|
wowlan_rx_bcmc_dis |
u8 |
0 / 1 |
Enable/Disable the ability for broadcast or multicast frames to wake the system in WoWLAN mode. |
0 |