Pin assigment for UART in ESP32
rafacouto opened this issue · comments
Rafa Couto commented
Currently, pin assignment for second and third UART in ESP32 port are these ones:
- UART 1: TX=gpio19 RX=gpio23
- UART 2: TX=gpio18 RX=gpio05
However, according to the datasheet, the alternate functions of pins (Technical Reference Manual, 4.10 IO_MUX Pad List) should be:
- UART 1: TX=gpio10 RX=gpio09
- UART 2: TX=gpio17 RX=gpio16
Moreover, published pinout diagrams like show gpio10,09 and gpio17,16 as TX,RX for u1 and u2.
Is the current code right? Should it be changed?
Erik Moqvist commented
I see no reason not to change it to match the pinout picture. I think the UART driver and pin mapping was implemented before that picture was published, so I just picked pins randomly. Can't remember exactly...