mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-16 07:42:37 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user