From b1540e24704a8cde5083413acb40672e3158b72e Mon Sep 17 00:00:00 2001 From: Li Shuai Date: Thu, 29 Feb 2024 11:25:46 +0800 Subject: [PATCH] change(esp_hw_support): use power down peripheral in light sleep option to determine TOP to off --- components/esp_hw_support/sleep_system_peripheral.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/esp_hw_support/sleep_system_peripheral.c b/components/esp_hw_support/sleep_system_peripheral.c index 4f3b92b590..3ba63ffaff 100644 --- a/components/esp_hw_support/sleep_system_peripheral.c +++ b/components/esp_hw_support/sleep_system_peripheral.c @@ -144,11 +144,15 @@ error: bool peripheral_domain_pd_allowed(void) { +#if CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP const uint32_t inited_modules = sleep_retention_get_inited_modules(); const uint32_t created_modules = sleep_retention_get_created_modules(); const uint32_t mask = (const uint32_t) (BIT(SLEEP_RETENTION_MODULE_SYS_PERIPH)); return ((inited_modules & mask) == (created_modules & mask)); +#else + return false; +#endif } #if CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP