mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(pm): cancel cache_safe_assertion when using ext0 & ext1
This commit is contained in:
parent
45990692d1
commit
4c3f6efbd7
@ -1322,8 +1322,21 @@ esp_err_t esp_light_sleep_start(void)
|
|||||||
|
|
||||||
#if CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION && CONFIG_PM_SLP_IRAM_OPT
|
#if CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION && CONFIG_PM_SLP_IRAM_OPT
|
||||||
/* Cache Suspend 0: if CONFIG_PM_SLP_IRAM_OPT is enabled, suspend cache here so that the access to flash
|
/* Cache Suspend 0: if CONFIG_PM_SLP_IRAM_OPT is enabled, suspend cache here so that the access to flash
|
||||||
during the sleep process can be explicitly exposed. */
|
* during the sleep process can be explicitly exposed.
|
||||||
suspend_cache();
|
*
|
||||||
|
* If we use EXTx wakeup, we must put related codes in IRAM, but The `rtc_io_desc` table
|
||||||
|
* consumes a significant amount of memory. For example, on the ESP32, its size is 1008
|
||||||
|
* bytes. Therefore, when EXTx wakeup is enabled, we do not perform cache access checks here */
|
||||||
|
uint32_t ignore_check_wakeup_triggers = 0;
|
||||||
|
#if SOC_PM_SUPPORT_EXT0_WAKEUP
|
||||||
|
ignore_check_wakeup_triggers |= RTC_EXT0_TRIG_EN;
|
||||||
|
#endif
|
||||||
|
#if SOC_PM_SUPPORT_EXT1_WAKEUP
|
||||||
|
ignore_check_wakeup_triggers |= RTC_EXT1_TRIG_EN;
|
||||||
|
#endif
|
||||||
|
if (!(s_config.wakeup_triggers & ignore_check_wakeup_triggers)) {
|
||||||
|
suspend_cache();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Decide which power domains can be powered down
|
// Decide which power domains can be powered down
|
||||||
@ -1463,7 +1476,9 @@ esp_err_t esp_light_sleep_start(void)
|
|||||||
|
|
||||||
#if CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION && CONFIG_PM_SLP_IRAM_OPT
|
#if CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION && CONFIG_PM_SLP_IRAM_OPT
|
||||||
/* Cache Resume 0: sleep process done, resume cache for continue running */
|
/* Cache Resume 0: sleep process done, resume cache for continue running */
|
||||||
resume_cache();
|
if (!(s_config.wakeup_triggers & ignore_check_wakeup_triggers)) {
|
||||||
|
resume_cache();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !CONFIG_FREERTOS_UNICORE
|
#if !CONFIG_FREERTOS_UNICORE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user