Disable holds / isolations on RTC IO pads after deep sleep (#3539)

* disable holds on RTC IO pads after deep sleep

* Don't assume SOC_RTCIO_HOLD_SUPPORTED
This commit is contained in:
todd-herbert
2024-04-04 00:59:53 +13:00
committed by GitHub
parent 2caed6d29c
commit a570e50aca
2 changed files with 14 additions and 21 deletions

View File

@@ -147,6 +147,18 @@ void initDeepSleep()
LOG_INFO("Booted, wake cause %d (boot count %d), reset_reason=%s\n", wakeCause, bootCount, reason);
#endif
#if SOC_RTCIO_HOLD_SUPPORTED
// If waking from sleep, release any and all RTC GPIOs
if (wakeCause != ESP_SLEEP_WAKEUP_UNDEFINED) {
LOG_DEBUG("Disabling any holds on RTC IO pads\n");
for (uint8_t i = 0; i <= 45; i++) {
if (rtc_gpio_is_valid_gpio((gpio_num_t)i))
rtc_gpio_hold_dis((gpio_num_t)i);
}
}
#endif
#endif
}