Page 1 of 1

Default gpio for uart2 (ESP32-WROOM-32D)

Posted: Wed Nov 29, 2023 8:33 am
by boris-gu
I use ESP32-DevKitC (ESP32-WROOM-32D). I read in the datasheet that IO16 and IO17 are used for uart2.
But when I write this code, uart2 does not output anything.

Code: Select all

  uart_set_pin(UART_NUM_2, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE,
               UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);
But if I assign the TX and RX pins myself, then uart2 starts working properly

Code: Select all

  uart_set_pin(UART_NUM_2, GPIO_NUM_17, GPIO_NUM_16,
               UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);
Why is this happening? Which GPIOs are used by default for uart2?

Re: Default gpio for uart2 (ESP32-WROOM-32D)

Posted: Thu Nov 30, 2023 5:32 am
by MicroController
boris-gu wrote:
Wed Nov 29, 2023 8:33 am
Why is this happening? Which GPIOs are used by default for uart2?
After boot, the UART is not connected to any pins; and it stays this way when you select NO_CHANGE.