diff --git a/examples/bluetooth/nimble/power_save/README.md b/examples/bluetooth/nimble/power_save/README.md index c042c1a7403..62ce2a31556 100644 --- a/examples/bluetooth/nimble/power_save/README.md +++ b/examples/bluetooth/nimble/power_save/README.md @@ -33,6 +33,50 @@ This example contains some build configurations. For each configuration, a few c - `sdkconfig.defaults.esp32h21`: ESP32H21 uses 32kHz XTAL as low power clock in light sleep enabled. - `sdkconfig.32m.esp32h21`: ESP32H21 uses main XTAL as low power clock in light sleep enabled. +## Menuconfig Options for Power Optimization + +Some configurations can reduce system power consumption at the cost of minor RAM overhead and limited auxiliary functions. + +### 1. Placing Core Functions in IRAM + +Moving frequently executed core code from flash to IRAM improves running efficiency and reduces system power consumption with the trade-off of higher static RAM occupation. + +#### Bluetooth Functions in IRAM + +**Supported chips: ESP32H4, ESP32S31** + +- `CONFIG_BT_CTRL_SLEEP_RELATED_CODE_IN_IRAM` +- `CONFIG_BT_CTRL_LE_ADV_SLEEP_CODE_IN_IRAM` +- `CONFIG_BT_CTRL_LE_CONN_SLEEP_CODE_IN_IRAM` + +#### Sleep Related Functions in IRAM + +- `CONFIG_PM_SLP_IRAM_OPT` +- `CONFIG_PM_RTOS_IDLE_OPT` + +#### FreeRTOS Kernel Functions in IRAM + +- `CONFIG_FREERTOS_IN_IRAM` + +#### Phy Related Functions in IRAM + +**Supported chips: ESP32H4, ESP32H2, ESP32H21** + +- `CONFIG_ESP_PHY_INIT_IRAM` + +### 2. Unused Peripheral Module Disable Configurations + +Turning off unused peripheral modules achieves further power optimization. + +#### Disable USB Serial JTAG + +- `CONFIG_ESP_CONSOLE_SECONDARY_NONE` +- `CONFIG_USJ_ENABLE_USB_SERIAL_JTAG` + +#### Disable Hardware PC Recording Debug Module + +- `CONFIG_ESP_SYSTEM_HW_PC_RECORD` + ## How to use example ### Hardware Required diff --git a/examples/bluetooth/nimble/power_save/main/Kconfig.projbuild b/examples/bluetooth/nimble/power_save/main/Kconfig.projbuild index 70dcff8042b..aa3d06a5bd7 100644 --- a/examples/bluetooth/nimble/power_save/main/Kconfig.projbuild +++ b/examples/bluetooth/nimble/power_save/main/Kconfig.projbuild @@ -26,6 +26,11 @@ menu "Example Configuration" default 3 if BLE_SM_IO_CAP_NO_IO default 4 if BLE_SM_IO_CAP_KEYBOARD_DISP + config EXAMPLE_USE_SCLI + bool + default y if BLE_SM_IO_CAP_DISP_YES_NO || BLE_SM_IO_CAP_KEYBOARD_ONLY || BLE_SM_IO_CAP_KEYBOARD_DISP + select UART_ISR_IN_IRAM + config EXAMPLE_BONDING bool default n diff --git a/examples/bluetooth/nimble/power_save/main/main.c b/examples/bluetooth/nimble/power_save/main/main.c index e80f56c8e6f..f30f8c6a7e9 100644 --- a/examples/bluetooth/nimble/power_save/main/main.c +++ b/examples/bluetooth/nimble/power_save/main/main.c @@ -638,9 +638,11 @@ app_main(void) nimble_port_freertos_init(bleprph_host_task); +#if CONFIG_EXAMPLE_USE_SCLI /* Initialize command line interface to accept input from user */ rc = scli_init(); if (rc != ESP_OK) { ESP_LOGE(tag, "scli_init() failed"); } +#endif // CONFIG_EXAMPLE_USE_SCLI } diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.26m.esp32c2 b/examples/bluetooth/nimble/power_save/sdkconfig.26m.esp32c2 index b9121b61531..a75f6f84c5e 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.26m.esp32c2 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.26m.esp32c2 @@ -4,12 +4,6 @@ CONFIG_IDF_TARGET="esp32c2" CONFIG_BT_LE_SLEEP_ENABLE=y CONFIG_BT_LE_LP_CLK_SRC_MAIN_XTAL=y -# -# Power Management -# -CONFIG_PM_ENABLE=y -CONFIG_PM_DFS_INIT_AUTO=y - # XTAL Freq Config CONFIG_XTAL_FREQ_26=y CONFIG_XTAL_FREQ=26 @@ -18,7 +12,3 @@ CONFIG_XTAL_FREQ=26 # Sleep Config # CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y -CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION=y - -# RTC clock source -CONFIG_RTC_CLK_SRC_INT_RC=y diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.32m.esp32h2 b/examples/bluetooth/nimble/power_save/sdkconfig.32m.esp32h2 index 3bb77bf4312..99e3f409fcb 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.32m.esp32h2 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.32m.esp32h2 @@ -4,20 +4,10 @@ CONFIG_IDF_TARGET="esp32h2" CONFIG_BT_LE_SLEEP_ENABLE=y CONFIG_BT_LE_LP_CLK_SRC_MAIN_XTAL=y -# -# Power Management -# -CONFIG_PM_ENABLE=y -CONFIG_PM_DFS_INIT_AUTO=y -CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=y -# end of Power Management - 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 6ce9b30f6ac..e0e5fd62dfa 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.32m.esp32h21 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.32m.esp32h21 @@ -4,20 +4,4 @@ CONFIG_IDF_TARGET="esp32h21" CONFIG_BT_LE_SLEEP_ENABLE=y CONFIG_BT_LE_LP_CLK_SRC_MAIN_XTAL=y -# -# Power Management -# -CONFIG_PM_ENABLE=y -CONFIG_PM_DFS_INIT_AUTO=y -CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=y -CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP=y -# end of Power Management - 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 21bfb62ff6e..bbec9a105d1 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.32m.esp32h4 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.32m.esp32h4 @@ -3,21 +3,10 @@ CONFIG_IDF_TARGET="esp32h4" # Bluetooth Low Power Config CONFIG_BT_CTRL_SLEEP_ENABLE=y CONFIG_BT_CTRL_LP_CLK_SRC_MAIN_XTAL=y +CONFIG_BT_CTRL_SLEEP_RELATED_CODE_IN_IRAM=y +CONFIG_BT_CTRL_LE_ADV_SLEEP_CODE_IN_IRAM=y +CONFIG_BT_CTRL_LE_CONN_SLEEP_CODE_IN_IRAM=y +CONFIG_BT_CTRL_SLEEP_ETM_TRIGGERED_RF=y -# -# Power Management -# -CONFIG_PM_ENABLE=y -CONFIG_PM_DFS_INIT_AUTO=y -CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=y -# end of Power Management - -CONFIG_FREERTOS_USE_TICKLESS_IDLE=y 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 +CONFIG_ESP_PHY_HW_SWITCH_RF=y diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.40m.esp32c6 b/examples/bluetooth/nimble/power_save/sdkconfig.40m.esp32c6 index 26534a800fb..f97fdd58094 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.40m.esp32c6 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.40m.esp32c6 @@ -4,22 +4,12 @@ CONFIG_IDF_TARGET="esp32c6" CONFIG_BT_LE_SLEEP_ENABLE=y CONFIG_BT_LE_LP_CLK_SRC_MAIN_XTAL=y -# -# Power Management -# -CONFIG_PM_ENABLE=y -CONFIG_PM_DFS_INIT_AUTO=y -CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=y -# end of Power Management - -CONFIG_FREERTOS_USE_TICKLESS_IDLE=y CONFIG_ESP_MODEM_CLOCK_ENABLE_CHECKING=y +CONFIG_ESP_PHY_HW_SWITCH_RF=y # # Sleep Config # -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 ba02349c378..16b51a56bed 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.40m.esp32c61 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.40m.esp32c61 @@ -4,20 +4,5 @@ CONFIG_IDF_TARGET="esp32c61" CONFIG_BT_LE_SLEEP_ENABLE=y CONFIG_BT_LE_LP_CLK_SRC_MAIN_XTAL=y -# -# Power Management -# -CONFIG_PM_ENABLE=y -CONFIG_PM_DFS_INIT_AUTO=y -CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=y -# end of Power Management - -CONFIG_FREERTOS_USE_TICKLESS_IDLE=y 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 +CONFIG_ESP_PHY_HW_SWITCH_RF=y diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.40m.esp32s31 b/examples/bluetooth/nimble/power_save/sdkconfig.40m.esp32s31 index 43b606164ab..0001c3449e5 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.40m.esp32s31 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.40m.esp32s31 @@ -3,21 +3,10 @@ CONFIG_IDF_TARGET="esp32s31" # Bluetooth Low Power Config CONFIG_BT_CTRL_SLEEP_ENABLE=y CONFIG_BT_CTRL_LP_CLK_SRC_MAIN_XTAL=y +CONFIG_BT_CTRL_SLEEP_RELATED_CODE_IN_IRAM=y +CONFIG_BT_CTRL_LE_ADV_SLEEP_CODE_IN_IRAM=y +CONFIG_BT_CTRL_LE_CONN_SLEEP_CODE_IN_IRAM=y +CONFIG_BT_CTRL_SLEEP_ETM_TRIGGERED_RF=y -# -# Power Management -# -CONFIG_PM_ENABLE=y -CONFIG_PM_DFS_INIT_AUTO=y -CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=y -# end of Power Management - -CONFIG_FREERTOS_USE_TICKLESS_IDLE=y 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 +CONFIG_ESP_PHY_HW_SWITCH_RF=y diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.48m.esp32c5 b/examples/bluetooth/nimble/power_save/sdkconfig.48m.esp32c5 index 756a841b708..2704996a6f1 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.48m.esp32c5 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.48m.esp32c5 @@ -4,20 +4,5 @@ CONFIG_IDF_TARGET="esp32c5" CONFIG_BT_LE_SLEEP_ENABLE=y CONFIG_BT_LE_LP_CLK_SRC_MAIN_XTAL=y -# -# Power Management -# -CONFIG_PM_ENABLE=y -CONFIG_PM_DFS_INIT_AUTO=y -CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=y -# end of Power Management - -CONFIG_FREERTOS_USE_TICKLESS_IDLE=y 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 +CONFIG_ESP_PHY_HW_SWITCH_RF=y diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.defaults b/examples/bluetooth/nimble/power_save/sdkconfig.defaults index ab387f2ed7f..fc798bf2f07 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.defaults +++ b/examples/bluetooth/nimble/power_save/sdkconfig.defaults @@ -10,6 +10,8 @@ CONFIG_BT_NIMBLE_ENABLED=y # Enable support for power management CONFIG_PM_ENABLE=y +CONFIG_PM_DFS_INIT_AUTO=y +CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP=y # Enable tickless idle mode CONFIG_FREERTOS_USE_TICKLESS_IDLE=y # Set the tick rate at which FreeRTOS does pre-emptive context switching. @@ -17,3 +19,19 @@ CONFIG_FREERTOS_HZ=1000 # Minimum number of ticks to enter sleep mode for CONFIG_FREERTOS_IDLE_TIME_BEFORE_SLEEP=3 CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=4000 +CONFIG_ESP_MODEM_CLOCK_ENABLE_CHECKING=y + +# Place sleep-related PM code in IRAM +CONFIG_PM_SLP_IRAM_OPT=y +# Place RTOS idle and PM ISR related code in IRAM +CONFIG_PM_RTOS_IDLE_OPT=y +# Place FreeRTOS functions in IRAM +CONFIG_FREERTOS_IN_IRAM=y +# Disable secondary console +CONFIG_ESP_CONSOLE_SECONDARY_NONE=y +# Disable USB Serial/JTAG +CONFIG_USJ_ENABLE_USB_SERIAL_JTAG=n +# Disable HW PC recording +CONFIG_ESP_SYSTEM_HW_PC_RECORD=n +# Used QIO Flash SPI mode +CONFIG_ESPTOOLPY_FLASHMODE_QIO=y diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.dram_optimised b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.dram_optimised index bc9d17faa50..6b2ffff0126 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.dram_optimised +++ b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.dram_optimised @@ -9,9 +9,9 @@ CONFIG_BT_BLUEDROID_ENABLED=n CONFIG_BT_NIMBLE_ENABLED=y # Enable support for power management -CONFIG_PM_ENABLE=y + # Enable tickless idle mode -CONFIG_FREERTOS_USE_TICKLESS_IDLE=y + # Set the tick rate at which FreeRTOS does pre-emptive context switching. CONFIG_FREERTOS_HZ=1000 # Minimum number of ticks to enter sleep mode for diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c2 b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c2 index 55320c019ab..38c1c78fa28 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c2 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c2 @@ -4,12 +4,6 @@ CONFIG_IDF_TARGET="esp32c2" CONFIG_BT_LE_SLEEP_ENABLE=y CONFIG_BT_LE_LP_CLK_SRC_DEFAULT=y -# -# Power Management -# -CONFIG_PM_ENABLE=y -CONFIG_PM_DFS_INIT_AUTO=y - # XTAL Freq Config CONFIG_XTAL_FREQ_26=y CONFIG_XTAL_FREQ=26 @@ -18,7 +12,6 @@ CONFIG_XTAL_FREQ=26 # Sleep Config # CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y -CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION=y # RTC clock source CONFIG_RTC_CLK_SRC_EXT_OSC=y diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c5 b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c5 index 6f545ebec6b..9ec8259355a 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c5 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c5 @@ -4,24 +4,9 @@ CONFIG_IDF_TARGET="esp32c5" CONFIG_BT_LE_SLEEP_ENABLE=y CONFIG_BT_LE_LP_CLK_SRC_DEFAULT=y -# -# Power Management -# -CONFIG_PM_ENABLE=y -CONFIG_PM_DFS_INIT_AUTO=y -CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=y -CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP=y -# end of Power Management -CONFIG_FREERTOS_USE_TICKLESS_IDLE=y 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 +CONFIG_ESP_PHY_HW_SWITCH_RF=y # # RTC Clock Config diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c6 b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c6 index 582f7034d12..3577f097f61 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c6 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c6 @@ -4,16 +4,7 @@ CONFIG_IDF_TARGET="esp32c6" CONFIG_BT_LE_SLEEP_ENABLE=y CONFIG_BT_LE_LP_CLK_SRC_DEFAULT=y -# -# Power Management -# -CONFIG_PM_ENABLE=y -CONFIG_PM_DFS_INIT_AUTO=y -CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=y -CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP=y -# end of Power Management -CONFIG_FREERTOS_USE_TICKLESS_IDLE=y CONFIG_ESP_MODEM_CLOCK_ENABLE_CHECKING=y # @@ -21,8 +12,8 @@ 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 +CONFIG_ESP_PHY_HW_SWITCH_RF=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 b037beb4f95..2f38dfb5703 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c61 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32c61 @@ -4,24 +4,8 @@ CONFIG_IDF_TARGET="esp32c61" CONFIG_BT_LE_SLEEP_ENABLE=y CONFIG_BT_LE_LP_CLK_SRC_DEFAULT=y -# -# Power Management -# -CONFIG_PM_ENABLE=y -CONFIG_PM_DFS_INIT_AUTO=y -CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=y -CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP=y -# end of Power Management - -CONFIG_FREERTOS_USE_TICKLESS_IDLE=y 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 +CONFIG_ESP_PHY_HW_SWITCH_RF=y # # RTC Clock Config diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32h2 b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32h2 index d1234542f76..bfa5f08980b 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32h2 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32h2 @@ -4,23 +4,12 @@ CONFIG_IDF_TARGET="esp32h2" CONFIG_BT_LE_SLEEP_ENABLE=y CONFIG_BT_LE_LP_CLK_SRC_DEFAULT=y -# -# Power Management -# -CONFIG_PM_ENABLE=y -CONFIG_PM_DFS_INIT_AUTO=y -CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=y -CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP=y -# end of Power Management - 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 a7baac63834..fc6eb500248 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32h21 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32h21 @@ -4,24 +4,8 @@ CONFIG_IDF_TARGET="esp32h21" CONFIG_BT_LE_SLEEP_ENABLE=y CONFIG_BT_LE_LP_CLK_SRC_DEFAULT=y -# -# Power Management -# -CONFIG_PM_ENABLE=y -CONFIG_PM_DFS_INIT_AUTO=y -CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=y -CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP=y -# end of Power Management - 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 - # # RTC Clock Config # diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32h4 b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32h4 index d0629a1af3b..86b0c595ed3 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32h4 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32h4 @@ -3,24 +3,13 @@ CONFIG_IDF_TARGET="esp32h4" # Bluetooth Low Power Config CONFIG_BT_CTRL_SLEEP_ENABLE=y CONFIG_BT_CTRL_LP_CLK_SRC_DEFAULT=y - -# -# Power Management -# -CONFIG_PM_ENABLE=y -CONFIG_PM_DFS_INIT_AUTO=y -CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=y -CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP=y -# end of Power Management +CONFIG_BT_CTRL_SLEEP_RELATED_CODE_IN_IRAM=y +CONFIG_BT_CTRL_LE_ADV_SLEEP_CODE_IN_IRAM=y +CONFIG_BT_CTRL_LE_CONN_SLEEP_CODE_IN_IRAM=y +CONFIG_BT_CTRL_SLEEP_ETM_TRIGGERED_RF=y 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 +CONFIG_ESP_PHY_HW_SWITCH_RF=y # # RTC Clock Config diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32s31 b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32s31 index 590402d0b61..afa37cdb393 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32s31 +++ b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.esp32s31 @@ -3,25 +3,13 @@ CONFIG_IDF_TARGET="esp32s31" # Bluetooth Low Power Config CONFIG_BT_CTRL_SLEEP_ENABLE=y CONFIG_BT_CTRL_LP_CLK_SRC_DEFAULT=y +CONFIG_BT_CTRL_SLEEP_RELATED_CODE_IN_IRAM=y +CONFIG_BT_CTRL_LE_ADV_SLEEP_CODE_IN_IRAM=y +CONFIG_BT_CTRL_LE_CONN_SLEEP_CODE_IN_IRAM=y +CONFIG_BT_CTRL_SLEEP_ETM_TRIGGERED_RF=y -# -# Power Management -# -CONFIG_PM_ENABLE=y -CONFIG_PM_DFS_INIT_AUTO=y -CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=y -CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP=y -# end of Power Management - -CONFIG_FREERTOS_USE_TICKLESS_IDLE=y 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 +CONFIG_ESP_PHY_HW_SWITCH_RF=y # # RTC Clock Config diff --git a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.mini b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.mini index 6c21af060fc..a7ab560511e 100644 --- a/examples/bluetooth/nimble/power_save/sdkconfig.defaults.mini +++ b/examples/bluetooth/nimble/power_save/sdkconfig.defaults.mini @@ -35,9 +35,9 @@ CONFIG_BT_NIMBLE_HR_SERVICE=n CONFIG_BT_NIMBLE_DIS_SERVICE=n # Enable support for power management -CONFIG_PM_ENABLE=y + # Enable tickless idle mode -CONFIG_FREERTOS_USE_TICKLESS_IDLE=y + # Set the tick rate at which FreeRTOS does pre-emptive context switching. CONFIG_BT_ALARM_MAX_NUM=15