diff --git a/components/bt/controller/esp32c5/bt.c b/components/bt/controller/esp32c5/bt.c index 830ced4532f..40a1980de4a 100644 --- a/components/bt/controller/esp32c5/bt.c +++ b/components/bt/controller/esp32c5/bt.c @@ -1137,7 +1137,7 @@ modem_deint: esp_bt_controller_log_deinit(); #endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED esp_phy_modem_deinit(SLEEP_MODEM_BT); - // modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE); + modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE); modem_clock_module_disable(PERIPH_BT_MODULE); free_mem: @@ -1162,7 +1162,7 @@ esp_err_t esp_bt_controller_deinit(void) os_msys_deinit(); esp_phy_modem_deinit(SLEEP_MODEM_BT); - // modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE); + modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE); modem_clock_module_disable(PERIPH_BT_MODULE); ble_stack_deinitEnv(); diff --git a/components/bt/porting_btdm/controller/btdm_common/src/btdm_lp.c b/components/bt/porting_btdm/controller/btdm_common/src/btdm_lp.c index fac8c23c401..d88ec8268f7 100644 --- a/components/bt/porting_btdm/controller/btdm_common/src/btdm_lp.c +++ b/components/bt/porting_btdm/controller/btdm_common/src/btdm_lp.c @@ -171,7 +171,7 @@ void btdm_lp_set_lpclk_src(modem_clock_lpclk_src_t clk_src) return; } - if (clk_src >= MODEM_CLOCK_LPCLK_SRC_MAX || clk_src <= MODEM_CLOCK_LPCLK_SRC_INVALID) { + if (clk_src >= MODEM_CLOCK_LPCLK_SRC_MAX) { return; } diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.32m.esp32h2 b/examples/bluetooth/nimble/power_save/sdkconfig.32m.esp32h2 index e25ae2874da..3bb77bf4312 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.32m.esp32h2 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.32m.esp32h2 @@ -18,5 +18,6 @@ CONFIG_ESP_MODEM_CLOCK_ENABLE_CHECKING=y # Sleep Config # CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y +CONFIG_PM_SLP_IRAM_OPT=y CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION=y # end of Sleep Config diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.32m.esp32h21 b/examples/bluetooth/nimble/power_save/sdkconfig.32m.esp32h21 index a2377a41e6b..6ce9b30f6ac 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.32m.esp32h21 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.32m.esp32h21 @@ -18,5 +18,6 @@ CONFIG_ESP_MODEM_CLOCK_ENABLE_CHECKING=y # # Sleep Config # +CONFIG_PM_SLP_IRAM_OPT=y CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION=y # end of Sleep Config diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.32m.esp32h4 b/examples/bluetooth/nimble/power_save/sdkconfig.32m.esp32h4 index a40da6eaff3..21bfb62ff6e 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.32m.esp32h4 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.32m.esp32h4 @@ -18,5 +18,6 @@ CONFIG_ESP_MODEM_CLOCK_ENABLE_CHECKING=y # # Sleep Config # +CONFIG_PM_SLP_IRAM_OPT=y CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION=y # end of Sleep Config diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.40m.esp32c6 b/examples/bluetooth/nimble/power_save/sdkconfig.40m.esp32c6 index c72be382de0..26534a800fb 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.40m.esp32c6 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.40m.esp32c6 @@ -20,5 +20,6 @@ CONFIG_ESP_MODEM_CLOCK_ENABLE_CHECKING=y # CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y CONFIG_ESP_PHY_MAC_BB_PD=y +CONFIG_PM_SLP_IRAM_OPT=y CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION=y # end of Sleep Config diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.40m.esp32c61 b/examples/bluetooth/nimble/power_save/sdkconfig.40m.esp32c61 index 34fd71dd83b..ba02349c378 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.40m.esp32c61 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.40m.esp32c61 @@ -18,5 +18,6 @@ CONFIG_ESP_MODEM_CLOCK_ENABLE_CHECKING=y # # Sleep Config # +CONFIG_PM_SLP_IRAM_OPT=y CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION=y # end of Sleep Config diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.40m.esp32s31 b/examples/bluetooth/nimble/power_save/sdkconfig.40m.esp32s31 index 500d813cdc1..43b606164ab 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.40m.esp32s31 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.40m.esp32s31 @@ -18,5 +18,6 @@ CONFIG_ESP_MODEM_CLOCK_ENABLE_CHECKING=y # # Sleep Config # +CONFIG_PM_SLP_IRAM_OPT=y CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION=y # end of Sleep Config diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.48m.esp32c5 b/examples/bluetooth/nimble/power_save/sdkconfig.48m.esp32c5 index f3f2dbe10ca..756a841b708 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.48m.esp32c5 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.48m.esp32c5 @@ -18,5 +18,6 @@ CONFIG_ESP_MODEM_CLOCK_ENABLE_CHECKING=y # # Sleep Config # +CONFIG_PM_SLP_IRAM_OPT=y CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION=y # end of Sleep Config diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c5 b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c5 index 943c1c203aa..6f545ebec6b 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c5 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c5 @@ -19,6 +19,7 @@ CONFIG_ESP_MODEM_CLOCK_ENABLE_CHECKING=y # # Sleep Config # +CONFIG_PM_SLP_IRAM_OPT=y CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION=y # end of Sleep Config diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c6 b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c6 index 56afbd9faef..582f7034d12 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c6 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c6 @@ -21,6 +21,7 @@ CONFIG_ESP_MODEM_CLOCK_ENABLE_CHECKING=y # CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y CONFIG_ESP_PHY_MAC_BB_PD=y +CONFIG_PM_SLP_IRAM_OPT=y CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION=y # end of Sleep Config diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c61 b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c61 index cd0f68a6d24..b037beb4f95 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c61 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c61 @@ -19,6 +19,7 @@ CONFIG_ESP_MODEM_CLOCK_ENABLE_CHECKING=y # # Sleep Config # +CONFIG_PM_SLP_IRAM_OPT=y CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION=y # end of Sleep Config diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32h2 b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32h2 index dad63e95024..d1234542f76 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32h2 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32h2 @@ -19,6 +19,7 @@ CONFIG_ESP_MODEM_CLOCK_ENABLE_CHECKING=y # Sleep Config # CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y +CONFIG_PM_SLP_IRAM_OPT=y CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION=y # end of Sleep Config diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32h21 b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32h21 index 98c9bdaf88d..a7baac63834 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32h21 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32h21 @@ -18,6 +18,7 @@ CONFIG_ESP_MODEM_CLOCK_ENABLE_CHECKING=y # # Sleep Config # +CONFIG_PM_SLP_IRAM_OPT=y CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION=y # end of Sleep Config diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32h4 b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32h4 index 53e2401cef9..d0629a1af3b 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32h4 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32h4 @@ -18,6 +18,7 @@ CONFIG_ESP_MODEM_CLOCK_ENABLE_CHECKING=y # # Sleep Config # +CONFIG_PM_SLP_IRAM_OPT=y CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION=y # end of Sleep Config diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32s31 b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32s31 index bf31b24e7c2..590402d0b61 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32s31 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32s31 @@ -19,6 +19,7 @@ CONFIG_ESP_MODEM_CLOCK_ENABLE_CHECKING=y # # Sleep Config # +CONFIG_PM_SLP_IRAM_OPT=y CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION=y # end of Sleep Config