mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
fix(sleep): fix the issue of asymmetry in suspend/resume cache when skipping sleep.
This commit is contained in:
@@ -860,6 +860,12 @@ static esp_err_t IRAM_ATTR esp_sleep_start(uint32_t pd_flags, esp_sleep_mode_t m
|
|||||||
resume_cache();
|
resume_cache();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CONFIG_ESP_SLEEP_SYSTIMER_STALL_WORKAROUND
|
||||||
|
if (!(pd_flags & RTC_SLEEP_PD_XTAL)) {
|
||||||
|
rtc_sleep_systimer_enable(true);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
#if CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION
|
#if CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION
|
||||||
if (pd_flags & RTC_SLEEP_PD_VDDSDIO) {
|
if (pd_flags & RTC_SLEEP_PD_VDDSDIO) {
|
||||||
/* Cache Suspend 2: If previous sleep powerdowned the flash, suspend cache here so that the
|
/* Cache Suspend 2: If previous sleep powerdowned the flash, suspend cache here so that the
|
||||||
@@ -867,14 +873,6 @@ static esp_err_t IRAM_ATTR esp_sleep_start(uint32_t pd_flags, esp_sleep_mode_t m
|
|||||||
suspend_cache();
|
suspend_cache();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_ESP_SLEEP_SYSTIMER_STALL_WORKAROUND
|
|
||||||
if (!(pd_flags & RTC_SLEEP_PD_XTAL)) {
|
|
||||||
rtc_sleep_systimer_enable(true);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
// Restore CPU frequency
|
// Restore CPU frequency
|
||||||
#if SOC_PM_SUPPORT_PMU_MODEM_STATE
|
#if SOC_PM_SUPPORT_PMU_MODEM_STATE
|
||||||
if (pmu_sleep_pll_already_enabled()) {
|
if (pmu_sleep_pll_already_enabled()) {
|
||||||
|
Reference in New Issue
Block a user