diff --git a/components/esp_hw_support/include/esp_sleep.h b/components/esp_hw_support/include/esp_sleep.h index 6a0b9d7d21..9822f0ba3d 100644 --- a/components/esp_hw_support/include/esp_sleep.h +++ b/components/esp_hw_support/include/esp_sleep.h @@ -372,6 +372,8 @@ esp_err_t esp_light_sleep_start(void); * * This function does not return. * + * @note The device will wake up immediately if the deep-sleep time is set to 0 + * * @param time_in_us deep-sleep time, unit: microsecond */ void esp_deep_sleep(uint64_t time_in_us) __attribute__((noreturn)); diff --git a/components/esp_hw_support/sleep_modes.c b/components/esp_hw_support/sleep_modes.c index ee68b21f0c..575ecc37d8 100644 --- a/components/esp_hw_support/sleep_modes.c +++ b/components/esp_hw_support/sleep_modes.c @@ -537,8 +537,7 @@ static uint32_t IRAM_ATTR esp_sleep_start(uint32_t pd_flags) } // Configure timer wakeup - if ((s_config.wakeup_triggers & RTC_TIMER_TRIG_EN) && - s_config.sleep_duration > 0) { + if (s_config.wakeup_triggers & RTC_TIMER_TRIG_EN) { timer_wakeup_prepare(); }