ESP32 UART Hardware Serial Ports Help

rodmcm
Posts: 65
Joined: Sat Sep 02, 2017 3:31 am

Re: ESP32 UART Hardware Serial Ports Help

Postby rodmcm » Thu Jul 14, 2022 12:59 am

I use Pin 34 for RXD-0 35 for TXD-0 27 for RXD-2 28 for TXD-2

Works fine
Have you seen this?
Attachments
ESP32 Pins.xlsx
(20.15 KiB) Downloaded 501 times

kpin404
Posts: 14
Joined: Sat Apr 23, 2022 4:45 am

Re: ESP32 UART Hardware Serial Ports Help

Postby kpin404 » Thu Jul 14, 2022 1:58 am

Momin786 wrote:
Wed Jul 13, 2022 1:53 pm
#include <HardwareSerial.h>

HardwareSerial SerialPort(1); // use UART1

void setup()
{
SerialPort.begin(15200, SERIAL_8N1, 4, 2);
}
I have connected GPS module to UART1 GPIO9 and GPIO10 and tried to run the code for UART1 in the tutorial as you mentioned above and it switched-on the on board LED as its internally connected to PIN2 of the board and no GPS data in the serial monitor at all. Thanks.

kpin404
Posts: 14
Joined: Sat Apr 23, 2022 4:45 am

Re: ESP32 UART Hardware Serial Ports Help

Postby kpin404 » Thu Jul 14, 2022 4:07 am

rodmcm wrote:
Thu Jul 14, 2022 12:59 am
I use Pin 34 for RXD-0 35 for TXD-0 27 for RXD-2 28 for TXD-2

Works fine
Have you seen this?
You mean using GPIO pins, as GPIO pin numbering is different than board's actual pin numbers? Thanks.

Momin786
Posts: 13
Joined: Mon Jul 11, 2022 7:52 am
Contact:

Re: ESP32 UART Hardware Serial Ports Help

Postby Momin786 » Thu Jul 14, 2022 7:16 am

kpin404 wrote:
Thu Jul 14, 2022 4:07 am
rodmcm wrote:
Thu Jul 14, 2022 12:59 am
I use Pin 34 for RXD-0 35 for TXD-0 27 for RXD-2 28 for TXD-2

Works fine
Have you seen this?
You mean using GPIO pins, as GPIO pin numbering is different than board's actual pin numbers? Thanks.
GPIO9 and GPIO10 do not work with UART1 because they are internally connected to flash. You can other pins.
I create ESP32 tutorials and Projects using ESP-IDF https://esp32tutorials.com/

kpin404
Posts: 14
Joined: Sat Apr 23, 2022 4:45 am

Re: ESP32 UART Hardware Serial Ports Help

Postby kpin404 » Thu Jul 14, 2022 7:25 am

Momin786 wrote:
Thu Jul 14, 2022 7:16 am
kpin404 wrote:
Thu Jul 14, 2022 4:07 am
rodmcm wrote:
Thu Jul 14, 2022 12:59 am
I use Pin 34 for RXD-0 35 for TXD-0 27 for RXD-2 28 for TXD-2

Works fine
Have you seen this?
You mean using GPIO pins, as GPIO pin numbering is different than board's actual pin numbers? Thanks.
GPIO9 and GPIO10 do not work with UART1 because they are internally connected to flash. You can other pins.
Okay! let me try with using Pin 34 for RXD-0 35 for TXD-0 27 for RXD-2 28 for TXD-2. Thanks.

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

Re: ESP32 UART Hardware Serial Ports Help

Postby ESP_Sprite » Fri Jul 15, 2022 2:33 am

GPIO34 and up are input-only so they won't work as TX. You can still use them for RX, though (but do note that they also do not support internal pullups/pulldowns)

kpin404
Posts: 14
Joined: Sat Apr 23, 2022 4:45 am

Re: ESP32 UART Hardware Serial Ports Help

Postby kpin404 » Fri Jul 15, 2022 2:41 am

kpin404 wrote:
Thu Jul 14, 2022 7:25 am
Momin786 wrote:
Thu Jul 14, 2022 7:16 am
kpin404 wrote:
Thu Jul 14, 2022 4:07 am


You mean using GPIO pins, as GPIO pin numbering is different than board's actual pin numbers? Thanks.
GPIO9 and GPIO10 do not work with UART1 because they are internally connected to flash. You can other pins.
Okay! let me try with using Pin 34 for RXD-0 35 for TXD-0 27 for RXD-2 28 for TXD-2. Thanks.
Fixed the issue. I have remapped and tested with all the mentioned pins here i.e. 2,4,13, 25, 26.27,28,32,33,34,35 for ESP32 hardware UART1 serial port use successfully. Thank you all here in the discussion for providing their valuable support to me on this. Thanking you.

Who is online

Users browsing this forum: No registered users and 27 guests