Page 1 of 1

Reconfigure USB/JTAG module

Posted: Fri Sep 19, 2025 8:01 am
by Stipa88
Hi all.

Due to the lack of IO pins, I am forced to use the USB_N (IO_18) pin in the code. In the code, I configure that pin to be a GPIO output pin. USB/JTAG is no longer available, and the device is not seen as a COM port.

Question:

How can I reconfigure the GPIO pin during operation, so that USB/JTAG becomes available, and the device is seen as a COM port?
Thanks

Environment is
IDF 5.0
Windows
ESP32-C3_MINI

Re: Reconfigure USB/JTAG module

Posted: Fri Sep 19, 2025 6:00 pm
by ahsrabrifat
You can reconfigure GPIO18 back to USB function by calling gpio_reset_pin(18) (and 19 if touched) and re-installing the USB stack (e.g., tinyusb_driver_install). However, the host will see it as a new enumeration event — it won’t keep the same COM port session alive.