|
|
@@ -44,6 +44,7 @@
|
|
|
#include "soc/soc_caps.h"
|
|
|
#include "regi2c_ctrl.h" //For `REGI2C_ANA_CALI_PD_WORKAROUND`, temp
|
|
|
|
|
|
+#include "hal/cache_hal.h"
|
|
|
#include "hal/wdt_hal.h"
|
|
|
#include "hal/uart_hal.h"
|
|
|
#if SOC_TOUCH_SENSOR_SUPPORTED
|
|
|
@@ -746,6 +747,8 @@ static esp_err_t IRAM_ATTR esp_sleep_start(uint32_t pd_flags, esp_sleep_mode_t m
|
|
|
#if (CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP && CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND)
|
|
|
#if !CONFIG_IDF_TARGET_ESP32H2 // ESP32H2 TODO IDF-7359: related rtcio ll func not supported yet
|
|
|
if(!(pd_flags & PMU_SLEEP_PD_VDDSDIO)) {
|
|
|
+ /* Cache Suspend 1: will wait cache idle in cache suspend, also means SPI bus IDLE, then we can hold SPI CS pin safely*/
|
|
|
+ suspend_cache();
|
|
|
gpio_ll_hold_en(&GPIO, SPI_CS0_GPIO_NUM);
|
|
|
}
|
|
|
#endif
|
|
|
@@ -768,6 +771,8 @@ static esp_err_t IRAM_ATTR esp_sleep_start(uint32_t pd_flags, esp_sleep_mode_t m
|
|
|
#if !CONFIG_IDF_TARGET_ESP32H2 // ESP32H2 TODO IDF-7359: related rtcio ll func not supported yet
|
|
|
if(!(pd_flags & PMU_SLEEP_PD_VDDSDIO)) {
|
|
|
gpio_ll_hold_dis(&GPIO, SPI_CS0_GPIO_NUM);
|
|
|
+ /* Cache Resume 1: Resume cache for continue running*/
|
|
|
+ resume_cache();
|
|
|
}
|
|
|
#endif
|
|
|
#endif
|