From b7e26d5546dd02e9955232551c4e8952c9180e33 Mon Sep 17 00:00:00 2001 From: Li Shuai Date: Mon, 24 Mar 2025 14:53:26 +0800 Subject: [PATCH] change: power management iram memory usage optimization is only effective for esp32c2 --- components/esp_pm/Kconfig | 10 ++++++++++ components/esp_wifi/Kconfig | 1 + 2 files changed, 11 insertions(+) diff --git a/components/esp_pm/Kconfig b/components/esp_pm/Kconfig index 63340d08db..5bef4e16ae 100644 --- a/components/esp_pm/Kconfig +++ b/components/esp_pm/Kconfig @@ -1,4 +1,14 @@ menu "Power Management" + + config PM_SLEEP_FUNC_IN_IRAM + bool "Place Power Management module functions in IRAM" if IDF_TARGET_ESP32C2 + default y + select PM_SLP_IRAM_OPT if (SOC_LIGHT_SLEEP_SUPPORTED && ESP_TIMER_IN_IRAM) + select PM_RTOS_IDLE_OPT if FREERTOS_USE_TICKLESS_IDLE + select ESP_PERIPH_CTRL_FUNC_IN_IRAM + select ESP_REGI2C_CTRL_FUNC_IN_IRAM + + config PM_ENABLE bool "Support for power management" # SMP FreeRTOS currently does not support power management IDF-4997 diff --git a/components/esp_wifi/Kconfig b/components/esp_wifi/Kconfig index f56d6d7332..0793d53fdf 100644 --- a/components/esp_wifi/Kconfig +++ b/components/esp_wifi/Kconfig @@ -343,6 +343,7 @@ menu "Wi-Fi" config ESP_WIFI_SLP_IRAM_OPT bool "WiFi SLP IRAM speed optimization" select PM_SLP_DEFAULT_PARAMS_OPT + select PM_SLEEP_FUNC_IN_IRAM select ESP_PERIPH_CTRL_FUNC_IN_IRAM default y if SOC_WIFI_HE_SUPPORT help