diff --git a/components/esp_hw_support/lowpower/port/esp32h4/sleep_cpu.c b/components/esp_hw_support/lowpower/port/esp32h4/sleep_cpu.c index 78dbd4e812b..646fa1f80e6 100644 --- a/components/esp_hw_support/lowpower/port/esp32h4/sleep_cpu.c +++ b/components/esp_hw_support/lowpower/port/esp32h4/sleep_cpu.c @@ -484,6 +484,7 @@ esp_err_t sleep_cpu_configure(bool light_sleep_enable) #if CONFIG_PM_ESP_SLEEP_POWER_DOWN_CPU static IRAM_ATTR void smp_core_do_retention(void) { + esp_cpu_branch_prediction_disable(); uint8_t core_id = esp_cpu_get_core_id(); if (core_id == 0) { @@ -559,6 +560,7 @@ static IRAM_ATTR void smp_core_do_retention(void) ; } atomic_store(&s_smp_retention_state[core_id], SMP_IDLE); + esp_cpu_branch_prediction_enable(); } diff --git a/components/esp_hw_support/lowpower/port/esp32p4/sleep_cpu.c b/components/esp_hw_support/lowpower/port/esp32p4/sleep_cpu.c index 5d5d90da4a0..a0107a59b90 100644 --- a/components/esp_hw_support/lowpower/port/esp32p4/sleep_cpu.c +++ b/components/esp_hw_support/lowpower/port/esp32p4/sleep_cpu.c @@ -386,6 +386,7 @@ esp_err_t sleep_cpu_configure(bool light_sleep_enable) #if CONFIG_PM_ESP_SLEEP_POWER_DOWN_CPU static SPM_IRAM_ATTR void smp_core_do_retention(void) { + esp_cpu_branch_prediction_disable(); uint8_t core_id = esp_cpu_get_core_id(); if (core_id == 0) { @@ -452,6 +453,7 @@ static SPM_IRAM_ATTR void smp_core_do_retention(void) ; } atomic_store(&s_smp_retention_state[core_id], SMP_IDLE); + esp_cpu_branch_prediction_enable(); }