From ced9c9eeb679ab3edf1ecbbecce6ed137ce91a4a Mon Sep 17 00:00:00 2001 From: jingli Date: Sat, 5 Nov 2022 17:09:58 +0800 Subject: [PATCH] esp_hw_support/sleep: remove redundant spinlock protection for deep sleep --- components/esp_hw_support/sleep_modes.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/components/esp_hw_support/sleep_modes.c b/components/esp_hw_support/sleep_modes.c index f58e51546a..791909b203 100644 --- a/components/esp_hw_support/sleep_modes.c +++ b/components/esp_hw_support/sleep_modes.c @@ -493,14 +493,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); - #if !CONFIG_IDF_TARGET_ESP32H2 // IDF does not officially support esp32h2 in v4.4 esp_sleep_isolate_digital_gpio(); #endif @@ -526,8 +518,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_VERIFY_STUB_ONLY - - portEXIT_CRITICAL(&spinlock_rtc_deep_sleep); } else { result = call_rtc_sleep_start(reject_triggers, config.lslp_mem_inf_fpu); }