fix esp32s2 fall into sleep forever when deep-sleep time is set to 0(backport v4.2)

pull/7355/head
Chen Yi Qun 2021-05-17 12:02:32 +08:00 zatwierdzone przez bot
rodzic 21f4f460ca
commit 20e41d6265
4 zmienionych plików z 6 dodań i 4 usunięć

Wyświetl plik

@ -286,6 +286,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));

Wyświetl plik

@ -198,8 +198,7 @@ static uint32_t IRAM_ATTR esp_sleep_start(uint32_t pd_flags)
rtc_sleep_init(config);
// 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();
}

Wyświetl plik

@ -297,6 +297,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));

Wyświetl plik

@ -223,8 +223,7 @@ static uint32_t IRAM_ATTR esp_sleep_start(uint32_t pd_flags)
rtc_sleep_init(config);
// 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();
}