mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 09:39:10 -04:00
fix(esp_hw_support): fix unsafe sleep critical area
This commit is contained in:
parent
2ceddff922
commit
0d06f94d99
@ -1424,7 +1424,6 @@ esp_err_t esp_light_sleep_start(void)
|
|||||||
wdt_hal_disable(&rtc_wdt_ctx);
|
wdt_hal_disable(&rtc_wdt_ctx);
|
||||||
wdt_hal_write_protect_enable(&rtc_wdt_ctx);
|
wdt_hal_write_protect_enable(&rtc_wdt_ctx);
|
||||||
}
|
}
|
||||||
portEXIT_CRITICAL(&s_config.lock);
|
|
||||||
|
|
||||||
#if CONFIG_ESP_TASK_WDT_USE_ESP_TIMER
|
#if CONFIG_ESP_TASK_WDT_USE_ESP_TIMER
|
||||||
/* Restart the Task Watchdog timer as it was stopped before sleeping. */
|
/* Restart the Task Watchdog timer as it was stopped before sleeping. */
|
||||||
@ -1441,6 +1440,8 @@ esp_err_t esp_light_sleep_start(void)
|
|||||||
s_sleep_ctx->sleep_request_result = err;
|
s_sleep_ctx->sleep_request_result = err;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
portEXIT_CRITICAL(&s_config.lock);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user