Skip to content

Commit

Permalink
fix(esp32-c6): Disable RTC WDT reset to prevent port disappearing
Browse files Browse the repository at this point in the history
  • Loading branch information
radimkarnis committed Dec 3, 2024
1 parent 6cc002c commit d47004e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions esptool/targets/esp32c6.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import struct

from .esp32c3 import ESP32C3ROM
from ..loader import ESPLoader
from ..util import FatalError, NotImplementedInROMError


Expand Down Expand Up @@ -194,6 +195,11 @@ def check_spi_connection(self, spi_connection):
"consider using other pins for SPI flash connection."
)

def hard_reset(self):
# Bug in the USB-Serial/JTAG controller can cause the port to disappear
# if the chip is reset with RTC WDT, do a classic reset
ESPLoader.hard_reset(self)


class ESP32C6StubLoader(ESP32C6ROM):
"""Access class for ESP32C6 stub loader, runs on top of ROM.
Expand Down
1 change: 1 addition & 0 deletions esptool/targets/esp32h2.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def get_crystal_freq(self):
return 32

def hard_reset(self):
# RTC WDT reset not available, do a classic reset
ESPLoader.hard_reset(self)

def check_spi_connection(self, spi_connection):
Expand Down

0 comments on commit d47004e

Please sign in to comment.