Page 1 of 1

uart2 pinouts

Posted: Tue Nov 22, 2022 3:45 pm
by ArminArmin
Hi,

I am following this page of documentation for setting communication pins:
https://docs.espressif.com/projects/esp ... ation-pins

why it is like this:

Code: Select all

ESP_ERROR_CHECK(uart_set_pin(UART_NUM_2, 4, 5, 18, 19));
insterad of this:

Code: Select all

ESP_ERROR_CHECK(uart_set_pin(UART_NUM_2, 17, 16, 18, 19));
?

Since we are defining the pin numbers of the second uart, it make sense to use the pins that are allocated to uart_2.

Am I missing something?

Thanks

Re: uart2 pinouts

Posted: Wed Nov 23, 2022 6:55 am
by ESP_Sprite
It doesn't really matter. The pins can be anything (well, anything sensible) and the GPIO matrix will route the signals there. There are no pins 'allocated' to any UART; the pins indicated in the datasheet are simply the default pins for it.