Skip to content

Commit 5ff7691

Browse files
committed
fix(esp32c5): fix boot failure after USB-Serial-JTAG download
1 parent 23e5ec1 commit 5ff7691

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

esptool/targets/esp32c5.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class ESP32C5ROM(ESP32C6ROM):
6161
PCR_SYSCLK_XTAL_FREQ_S = 24
6262

6363
UARTDEV_BUF_NO = 0x4085F51C # Variable in ROM .bss which indicates the port in use
64+
UARTDEV_BUF_NO_USB_JTAG_SERIAL = 176 # The above var when USB-JTAG/Serial is used
6465

6566
FLASH_FREQUENCY = {
6667
"80m": 0xF,
@@ -142,6 +143,10 @@ def get_crystal_freq_rom_expect(self):
142143
) >> self.PCR_SYSCLK_XTAL_FREQ_S
143144

144145
def hard_reset(self):
146+
# Debug output using trace
147+
self.trace(f'get_uart_no(): {self.get_uart_no()}')
148+
self.trace(f'UARTDEV_BUF_NO_USB_JTAG_SERIAL: {self.UARTDEV_BUF_NO_USB_JTAG_SERIAL}')
149+
self.trace(f'uses_usb_jtag_serial(): {self.uses_usb_jtag_serial()}')
145150
ESPLoader.hard_reset(self, self.uses_usb_jtag_serial())
146151

147152
def change_baud(self, baud):

0 commit comments

Comments
 (0)