From c675bff4eeb3fb2ca9c7ed0de02c3c15d64f7e5a Mon Sep 17 00:00:00 2001 From: hebinglin Date: Thu, 20 Nov 2025 21:07:32 +0800 Subject: [PATCH] feat(esp_hw_support): support top pd during sleep in esp32c5 eco3 --- components/esp_hw_support/sleep_modes.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/esp_hw_support/sleep_modes.c b/components/esp_hw_support/sleep_modes.c index 5edebb9c7b..fcda2fe35d 100644 --- a/components/esp_hw_support/sleep_modes.c +++ b/components/esp_hw_support/sleep_modes.c @@ -2561,6 +2561,12 @@ FORCE_INLINE_ATTR bool top_domain_pd_allowed(void) { #if SOC_XTAL_CLOCK_PATH_DEPENDS_ON_TOP_DOMAIN top_pd_allowed &= (s_config.domain[ESP_PD_DOMAIN_XTAL].pd_option != ESP_PD_OPTION_ON); #endif +#if CONFIG_IDF_TARGET_ESP32C5 + if (!ESP_CHIP_REV_ABOVE(efuse_hal_chip_revision(), 102)) { + // ESP32C5 chips lower than v1.2 are not supported to power down the TOP domain + top_pd_allowed = false; + } +#endif return top_pd_allowed; }