diff --git a/components/esp32c3/Kconfig b/components/esp32c3/Kconfig index cd54d9c192..49e2b75656 100644 --- a/components/esp32c3/Kconfig +++ b/components/esp32c3/Kconfig @@ -78,10 +78,10 @@ menu "ESP32C3-Specific" e.g. GCOV data dump. config ESP32C3_BROWNOUT_DET - bool + bool "Hardware brownout detect & reset" default y help - The ESP32-S3 has a built-in brownout detector which can detect if the voltage is lower than + The ESP32-C3 has a built-in brownout detector which can detect if the voltage is lower than a specific value. If this happens, it will reset the chip in order to prevent unintended behaviour. diff --git a/components/esp_system/sleep_modes.c b/components/esp_system/sleep_modes.c index 1c846df1f3..7adcb468a9 100644 --- a/components/esp_system/sleep_modes.c +++ b/components/esp_system/sleep_modes.c @@ -1086,8 +1086,12 @@ static uint32_t get_power_down_flags(void) #endif // SOC_TOUCH_PAD_WAKE_SUPPORTED } -#if !SOC_PM_SUPPORT_CPU_PD - if (s_config.pd_options[ESP_PD_DOMAIN_CPU] == ESP_PD_OPTION_AUTO) { +#if SOC_PM_SUPPORT_CPU_PD + if (s_config.cpu_pd_mem == NULL) { + s_config.pd_options[ESP_PD_DOMAIN_CPU] = ESP_PD_OPTION_ON; + } +#else + if (s_config.pd_options[ESP_PD_DOMAIN_CPU] != ESP_PD_OPTION_ON) { s_config.pd_options[ESP_PD_DOMAIN_CPU] = ESP_PD_OPTION_ON; } #endif diff --git a/examples/system/light_sleep/main/light_sleep_example_main.c b/examples/system/light_sleep/main/light_sleep_example_main.c index d10c510aaf..28f39de5a5 100644 --- a/examples/system/light_sleep/main/light_sleep_example_main.c +++ b/examples/system/light_sleep/main/light_sleep_example_main.c @@ -18,6 +18,7 @@ #include "esp_log.h" #include "driver/uart.h" #include "driver/gpio.h" +#include "esp_timer.h" /* Most development boards have "boot" button attached to GPIO0. * You can also change this to another pin.