Doubt - uart usage

Hi there!

I have some doubts regarding usage of tx and rx of uart0. Please, would anyone help me?

Here is the doubt: I need to use an uart to communicate heltec wifi lora v2 module to an external board. Considering heltec lora wifi v2 schematic, uart 0 is the uart wired to tx and rx in pin headers (identified as tx and rx). However, usb / uart converter cp2102 uses uart 0 too (to communicate a pc with the board and write firmware to esp32).
As uart 0 is the only uart available to user in this module (uart 1 is for flash and uart 2 pins are being user to another module features), can I use uart 0 WITHOUT taking risk of cannot write firmware to esp32 no more (I mean, use uart 0 and don’t make the esp32 unflashable again)? If yes, how can I do that?

Thanks in advance.

Hello @phfbertoleti

I don’t think the UART0 is the only available UART for users.

ESP32 have IO_MUX function, any GPIO can be configured to a UART pin, I2C pin, SPI pin, etc.

Here is the example code of how to config UART1 and UART2:


@hunter8801, thanks for the information.