feat(esp32s3): clear boot control register on hard reset

This commit is contained in:
Peter Dragun
2024-03-20 09:56:46 +01:00
parent 39cdec292c
commit 1c355f9fad

View File

@@ -352,6 +352,16 @@ class ESP32S3ROM(ESP32ROM):
if uses_usb_otg:
self._check_if_can_reset()
try:
# Clear force download boot mode to avoid the chip being stuck in download mode after reset
# workaround for issue: https://github.com/espressif/arduino-esp32/issues/6762
self.write_reg(
self.RTC_CNTL_OPTION1_REG, 0, self.RTC_CNTL_FORCE_DOWNLOAD_BOOT_MASK
)
except Exception:
# Skip if response was not valid and proceed to reset; e.g. when monitoring while resetting
pass
print("Hard resetting via RTS pin...")
HardReset(self._port, uses_usb_otg)()