mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
fix(esp_hw_support): disable esp32eco3 livelock workaround to sleep process
This commit is contained in:
@@ -135,6 +135,10 @@
|
|||||||
#include "hal/clk_gate_ll.h"
|
#include "hal/clk_gate_ll.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if CONFIG_ESP_INT_WDT && CONFIG_ESP32_ECO3_CACHE_LOCK_FIX
|
||||||
|
#include "esp_private/eco3_livelock_workaround.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if SOC_MSPI_HAS_INDEPENT_IOMUX
|
#if SOC_MSPI_HAS_INDEPENT_IOMUX
|
||||||
#include "hal/mspi_ll.h"
|
#include "hal/mspi_ll.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -1175,6 +1179,11 @@ static esp_err_t FORCE_IRAM_ATTR deep_sleep_start(bool allow_sleep_rejection)
|
|||||||
esp_os_enter_critical(&spinlock_rtc_deep_sleep);
|
esp_os_enter_critical(&spinlock_rtc_deep_sleep);
|
||||||
esp_ipc_isr_stall_other_cpu();
|
esp_ipc_isr_stall_other_cpu();
|
||||||
esp_ipc_isr_stall_pause();
|
esp_ipc_isr_stall_pause();
|
||||||
|
#if CONFIG_ESP_INT_WDT && CONFIG_ESP32_ECO3_CACHE_LOCK_FIX
|
||||||
|
// The other core will be stalled by high-priority interrupt and spins on variables in internal RAM,
|
||||||
|
// which naturally avoids cache livelock, so the 20ms livelock workaround timeout is not needed.
|
||||||
|
esp_int_wdt_livelock_workaround(false);
|
||||||
|
#endif
|
||||||
|
|
||||||
// record current RTC time
|
// record current RTC time
|
||||||
s_config.rtc_ticks_at_sleep_start = rtc_time_get();
|
s_config.rtc_ticks_at_sleep_start = rtc_time_get();
|
||||||
@@ -1241,6 +1250,10 @@ static esp_err_t FORCE_IRAM_ATTR deep_sleep_start(bool allow_sleep_rejection)
|
|||||||
ESP_INFINITE_LOOP();
|
ESP_INFINITE_LOOP();
|
||||||
}
|
}
|
||||||
// Never returns here, except that the sleep is rejected.
|
// Never returns here, except that the sleep is rejected.
|
||||||
|
#if CONFIG_ESP_INT_WDT && CONFIG_ESP32_ECO3_CACHE_LOCK_FIX
|
||||||
|
// Configure WDT to use livelock workaround timeout after releasing other CPU
|
||||||
|
esp_int_wdt_livelock_workaround(true);
|
||||||
|
#endif
|
||||||
esp_ipc_isr_stall_resume();
|
esp_ipc_isr_stall_resume();
|
||||||
esp_ipc_isr_release_other_cpu();
|
esp_ipc_isr_release_other_cpu();
|
||||||
esp_os_exit_critical(&spinlock_rtc_deep_sleep);
|
esp_os_exit_critical(&spinlock_rtc_deep_sleep);
|
||||||
@@ -1381,6 +1394,11 @@ esp_err_t esp_light_sleep_start(void)
|
|||||||
#if CONFIG_PM_ESP_SLEEP_POWER_DOWN_CPU && SOC_PM_CPU_RETENTION_BY_SW
|
#if CONFIG_PM_ESP_SLEEP_POWER_DOWN_CPU && SOC_PM_CPU_RETENTION_BY_SW
|
||||||
sleep_smp_cpu_sleep_prepare();
|
sleep_smp_cpu_sleep_prepare();
|
||||||
#else
|
#else
|
||||||
|
#if CONFIG_ESP_INT_WDT && CONFIG_ESP32_ECO3_CACHE_LOCK_FIX
|
||||||
|
// The other core will be stalled by high-priority interrupt and spins on variables in internal RAM,
|
||||||
|
// which naturally avoids cache livelock, so the 20ms livelock workaround timeout is not needed.
|
||||||
|
esp_int_wdt_livelock_workaround(false);
|
||||||
|
#endif
|
||||||
esp_ipc_isr_stall_other_cpu();
|
esp_ipc_isr_stall_other_cpu();
|
||||||
#endif
|
#endif
|
||||||
esp_ipc_isr_stall_pause();
|
esp_ipc_isr_stall_pause();
|
||||||
@@ -1569,6 +1587,10 @@ esp_err_t esp_light_sleep_start(void)
|
|||||||
sleep_smp_cpu_wakeup_prepare();
|
sleep_smp_cpu_wakeup_prepare();
|
||||||
#else
|
#else
|
||||||
esp_ipc_isr_release_other_cpu();
|
esp_ipc_isr_release_other_cpu();
|
||||||
|
#if CONFIG_ESP_INT_WDT && CONFIG_ESP32_ECO3_CACHE_LOCK_FIX
|
||||||
|
// Configure WDT to use livelock workaround timeout after releasing other CPU
|
||||||
|
esp_int_wdt_livelock_workaround(true);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user