Skip to content

Commit

Permalink
feat(esp32s3): clear boot control register on hard reset
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdragun committed Mar 20, 2024
1 parent 39cdec2 commit 1c355f9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions esptool/targets/esp32s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,16 @@ def hard_reset(self):
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)()

Expand Down

0 comments on commit 1c355f9

Please sign in to comment.