diff --git a/components/esp_hw_support/lowpower/cpu_retention/port/esp32p4/sleep_cpu.c b/components/esp_hw_support/lowpower/cpu_retention/port/esp32p4/sleep_cpu.c index 0797d3278b4..454f2eb053a 100644 --- a/components/esp_hw_support/lowpower/cpu_retention/port/esp32p4/sleep_cpu.c +++ b/components/esp_hw_support/lowpower/cpu_retention/port/esp32p4/sleep_cpu.c @@ -402,7 +402,11 @@ static TCM_IRAM_ATTR esp_err_t do_cpu_retention(sleep_cpu_entry_cb_t goto_sleep, } #endif - return (*goto_sleep)(wakeup_opt, reject_opt, lslp_mem_inf_fpu, dslp); + uint32_t reject = (*goto_sleep)(wakeup_opt, reject_opt, lslp_mem_inf_fpu, dslp); + if (reject) { + restore_mstatus(mstatus); + return reject; + } } #if CONFIG_PM_CHECK_SLEEP_RETENTION_FRAME else { diff --git a/components/esp_hw_support/port/esp32p4/private_include/pmu_param.h b/components/esp_hw_support/port/esp32p4/private_include/pmu_param.h index f8c23a9ace8..1ec5ac454ae 100644 --- a/components/esp_hw_support/port/esp32p4/private_include/pmu_param.h +++ b/components/esp_hw_support/port/esp32p4/private_include/pmu_param.h @@ -34,7 +34,7 @@ extern "C" { // FOR LIGHTSLEEP #define PMU_HP_DRVB_LIGHTSLEEP 0 #define PMU_LP_DRVB_LIGHTSLEEP 0 -#define PMU_HP_XPD_LIGHTSLEEP 1 +#define PMU_HP_XPD_LIGHTSLEEP 0 // Always use DCDC power supply in lightsleep #define PMU_DBG_ATTEN_LIGHTSLEEP_DEFAULT 0 #define PMU_HP_DBIAS_LIGHTSLEEP_0V6 1 diff --git a/components/esp_hw_support/sleep_modes.c b/components/esp_hw_support/sleep_modes.c index 090669fda7e..3e8ff0c0fbe 100644 --- a/components/esp_hw_support/sleep_modes.c +++ b/components/esp_hw_support/sleep_modes.c @@ -2452,7 +2452,7 @@ static uint32_t get_power_down_flags(void) #endif #if SOC_PM_SUPPORT_CNNT_PD - if (s_config.domain[ESP_PD_DOMAIN_CNNT].pd_option != ESP_PD_OPTION_ON) { + if (s_config.domain[ESP_PD_DOMAIN_CNNT].pd_option != ESP_PD_OPTION_ON && top_domain_pd_allowed()) { pd_flags |= PMU_SLEEP_PD_CNNT; } #endif