Kaynağa Gözat

Merge branch 'bugfix/sleep_rtc_bus_isolate_issue' into 'master'

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

Closes WIFI-3896

See merge request espressif/esp-idf!14721
Li Shuai 4 yıl önce
ebeveyn
işleme
de28280fd3

+ 4 - 0
components/esp_hw_support/Kconfig

@@ -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

+ 4 - 0
components/esp_hw_support/sleep_modes.c

@@ -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;