fix rtc register read error and add workaround for rtc bus isolate issue

This commit is contained in:
Li Shuai 2021-07-16 17:44:03 +08:00
parent 0f0bd29f8f
commit a82f33c9b5
2 changed files with 8 additions and 0 deletions

View File

@ -29,5 +29,9 @@ menu "Hardware Settings"
This option will in fact consider VDD_SDIO auto power value (ESP_PD_OPTION_AUTO) as OFF. Also, it is
possible to force a power domain to stay ON during light sleep by using esp_sleep_pd_config()
function.
config ESP_SLEEP_RTC_BUS_ISO_WORKAROUND
bool
default y if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
endmenu
endmenu

View File

@ -699,6 +699,10 @@ esp_err_t esp_light_sleep_start(void)
// Decide which power domains can be powered down
uint32_t pd_flags = get_power_down_flags();
#ifdef CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND
pd_flags &= ~RTC_SLEEP_PD_RTC_PERIPH;
#endif
// Re-calibrate the RTC Timer clock
#ifdef CONFIG_ESP_SYSTEM_RTC_EXT_XTAL
uint64_t time_per_us = 1000000ULL;