Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve WiFi light sleep performance #334

Merged
merged 2 commits into from
Jan 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions main/kernel/drivers/WiFiDriver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ class WiFiDriver {
LOGTV(Tag::WIFI, "Enabling power save mode, listen interval: %d",
listenInterval);
ESP_ERROR_CHECK(esp_wifi_set_ps(WIFI_PS_MAX_MODEM));
ESP_ERROR_CHECK(esp_sleep_enable_wifi_wakeup());
ESP_ERROR_CHECK(esp_sleep_enable_wifi_beacon_wakeup());
config.sta.listen_interval = listenInterval;
}

Expand Down
3 changes: 3 additions & 0 deletions sdkconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ CONFIG_PM_RESTORE_CACHE_TAGMEM_AFTER_LIGHT_SLEEP=y
# TODO Experiment with this
# CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP=y

CONFIG_ESP_PHY_MAC_BB_PD=y
CONFIG_ESP_WIFI_ENHANCED_LIGHT_SLEEP=y

# Recalibrate the RTC_FAST/SLOW clock less often
CONFIG_PM_LIGHTSLEEP_RTC_OSC_CAL_INTERVAL=16

Expand Down
Loading