mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-21 06:56:11 -04:00
fix(light_sleep): save vddsdio_config before lightsleep
This commit is contained in:
parent
aaf04f514f
commit
94d129df76
@ -898,11 +898,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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user