ESP32-S2 using USB pins as UART
Posted: Thu Jan 12, 2023 4:14 pm
Hello guru,
I need to use ESP32-S2 pins GPIO19 (USB_DM) and GPIO20 (USB_DP) as UART, but when I try it, the module is reboot continuously. I think is due to USB internal pin pull-up.
The ESP32-C3 datasheet it directly say that pull-up resistors of USB pins are controlled by USB_SERIAL_JTAG_DP_PULLUP bit and we can clear it to work:
The ESP32-S3 datasheet say nothing about, but in this forum I found a solution (tested and worked):
What should I do for ESP32-S2?
Thanks.
I need to use ESP32-S2 pins GPIO19 (USB_DM) and GPIO20 (USB_DP) as UART, but when I try it, the module is reboot continuously. I think is due to USB internal pin pull-up.
The ESP32-C3 datasheet it directly say that pull-up resistors of USB pins are controlled by USB_SERIAL_JTAG_DP_PULLUP bit and we can clear it to work:
Code: Select all
CLEAR_PERI_REG_MASK(USB_SERIAL_JTAG_CONF0_REG, USB_SERIAL_JTAG_DP_PULLUP);
Code: Select all
CLEAR_PERI_REG_MASK(USB_DEVICE_CONF0_REG, USB_DEVICE_USB_PAD_ENABLE);
Thanks.