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

boris-gu
Posts: 1
Joined: Wed Nov 29, 2023 8:20 am

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

Postby boris-gu » Wed Nov 29, 2023 8:33 am

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?

MicroController
Posts: 1706
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

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

Postby MicroController » Thu Nov 30, 2023 5:32 am

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.

Who is online

Users browsing this forum: Google [Bot], MichaelS and 98 guests