mirror of
https://github.com/espressif/esptool.git
synced 2025-10-17 07:32:30 +08:00
feat(esp32s3): clear boot control register on hard reset
This commit is contained in:
@@ -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)()
|
||||
|
||||
|
Reference in New Issue
Block a user