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.