uart2 pinouts

ArminArmin
Posts: 9
Joined: Mon Aug 08, 2022 6:14 pm

uart2 pinouts

Postby ArminArmin » Tue Nov 22, 2022 3:45 pm

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

ESP_Sprite
Posts: 9589
Joined: Thu Nov 26, 2015 4:08 am

Re: uart2 pinouts

Postby ESP_Sprite » Wed Nov 23, 2022 6:55 am

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.

Who is online

Users browsing this forum: No registered users and 124 guests