← index #17672PR #12200
Related · high · value 3.363
QUERY · ISSUE

ESP32-C6, ESP32-S3, etc.: MICROPY_HW_ENABLE_UART_REPL should be disabled for boards that have both direct USB and UART connectors

openby bikeNomadopened 2025-07-13updated 2025-08-10
enhancementport-esp32

Description

On many ESP32 boards, there are two USB connectors: one connected directly to the MCU and the other connected via a USB/UART bridge chip.

The default ESP32 build for these boards puts the REPL on both ports, making it impossible to use the USB/UART connector as an independent UART for other purposes.

See discussion at #17633 .

Code Size

No response

Implementation

I hope the MicroPython maintainers or community will implement 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