esp_hw_support/sleep: remove redundant spinlock protection for deep sleep

This commit is contained in:
jingli
2022-09-26 14:37:23 +08:00
parent 2b8c43df69
commit 5f60c4345e

View File

@@ -509,14 +509,6 @@ static uint32_t IRAM_ATTR esp_sleep_start(uint32_t pd_flags)
uint32_t result;
if (deep_sleep) {
/* Disable interrupts in case another task writes to RTC memory while we
* calculate RTC memory CRC
*
* Note: for ESP32-S3 running in dual core mode this is currently not enough,
* see the assert at top of this function.
*/
portENTER_CRITICAL(&spinlock_rtc_deep_sleep);
// TODO: IDF-6051, IDF-6052
#if !CONFIG_IDF_TARGET_ESP32H2 && !CONFIG_IDF_TARGET_ESP32C6
esp_sleep_isolate_digital_gpio();
@@ -546,8 +538,6 @@ static uint32_t IRAM_ATTR esp_sleep_start(uint32_t pd_flags)
result = rtc_deep_sleep_start(s_config.wakeup_triggers, reject_triggers);
#endif
#endif // SOC_PM_SUPPORT_DEEPSLEEP_CHECK_STUB_ONLY
portEXIT_CRITICAL(&spinlock_rtc_deep_sleep);
} else {
result = call_rtc_sleep_start(reject_triggers, config.lslp_mem_inf_fpu);
}