fix(light_sleep): save vddsdio_config before lightsleep

This commit is contained in:
wuzhenghui
2023-08-04 11:58:07 +08:00
parent 0b0e8ab80b
commit 8b5052f213

View File

@@ -917,11 +917,14 @@ static esp_err_t esp_light_sleep_inner(uint32_t pd_flags,
static esp_err_t esp_light_sleep_inner(uint32_t pd_flags, static esp_err_t esp_light_sleep_inner(uint32_t pd_flags,
uint32_t flash_enable_time_us) uint32_t flash_enable_time_us)
{ {
#if SOC_CONFIGURABLE_VDDSDIO_SUPPORTED
rtc_vddsdio_config_t vddsdio_config = rtc_vddsdio_get_config();
#endif
// Enter sleep // Enter sleep
esp_err_t reject = esp_sleep_start(pd_flags, ESP_SLEEP_MODE_LIGHT_SLEEP); esp_err_t reject = esp_sleep_start(pd_flags, ESP_SLEEP_MODE_LIGHT_SLEEP);
#if SOC_CONFIGURABLE_VDDSDIO_SUPPORTED #if SOC_CONFIGURABLE_VDDSDIO_SUPPORTED
rtc_vddsdio_config_t vddsdio_config = rtc_vddsdio_get_config();
// If VDDSDIO regulator was controlled by RTC registers before sleep, // If VDDSDIO regulator was controlled by RTC registers before sleep,
// restore the configuration. // restore the configuration.
if (vddsdio_config.force) { if (vddsdio_config.force) {