← index #18213PR #12200
Related · medium · value 1.030
QUERY · ISSUE

ESP32C6: USB not in board.json `features` but GPIO pins are disabled anyway

openby smurfixopened 2025-10-05updated 2025-10-08
enhancementport-esp32

Description

IMHO the default value for MICROPY_HW_ESP_USB_SERIAL_JTAG should be "is the USB feature turned on in the board.json file".

An even better default might be "micropython checks the EFuse flags and enables the pins iff these flags are set".

The relevant efuse bits are DIS_PAD_JTAG and DIS_USB_JTAG, see tech manual 9.2.4 "JTAG Signal Source Control" page 378/379.

Code Size

No response

Implementation

I would like to sponsor development of this feature

Code of Conduct

Yes, I agree

CANDIDATE · PULL REQUEST

ports/esp32: Support JTAG console, free up UART.

mergedby DvdGiessenopened 2023-08-09updated 2023-09-01
port-esp32

CONFIG_USB_OTG_SUPPORTED is automatically set by the ESP-IDF when the chip supports USB-OTG, which is the case for the ESP32-S2 and ESP32-S3.

When trying to use the JTAG console with these chips, it would not work because our USB implementation will take over control over the USB port, breaking the JTAG console in the process.

Thus, when the board is configured to use the JTAG console, we should not enable our USB console support.

Additionally, this change also frees up UART0 when an USB-based console is configured, since there's no reason to prevent (re)configuration of UART0 for other uses in that case.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied