← index #18213PR #8592
Related · high · value 1.386
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

esp32/machine_pin: fix ESP32C3 build with IDFv4.4.1

closedby DvdGiessenopened 2022-04-28updated 2022-05-19
port-esp32

The build for the ESP32C3 was broken with IDFv4.4.1 due to some constants no longer being defined.

../machine_pin.c: In function 'machine_pin_obj_init_helper':
../machine_pin.c:293:29: error: 'USB_DEVICE_CONF0_REG' undeclared
../machine_pin.c:293:51: error: 'USB_DEVICE_USB_PAD_ENABLE' undeclared

Constants in question were used to make the pins normally used by JTAG available as general GPIO pins.

espressif/esp-idf@b25fb1 removed said constants, and also showcases which constants can now be used instead.

EDIT: Previously typed 4.4, but of course that should be 4.4.1. :)

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