UART / Serial Garbled

GavinBrown
Posts: 1
Joined: Mon Oct 21, 2024 6:18 am

UART / Serial Garbled

Postby GavinBrown » Mon Oct 21, 2024 6:45 am

Hi all,

I'm working on a ESP32-S3-WROOM-1 custom board. I am using the Arduino IDE and the ESP32S3 Dev board type.

The board flashes correctly from the Arduino IDE.

My custom board has an L80-R GPS chip connected to the ESP32S3. The connections are: L80 TX -> ESP32 Pin 11 (as RX), and L80 RX -> ESP32 Pin 10 (as TX). Power and GND are all correct.

As per the doco from the GPS manufacturer - the initial baud rate from the GPS is 9600, SERIAL_8N1.

I am using a very basic Arduino C++ program to read the chars coming from the L80 GPS however they are garbled. i.e. � or int 255.

I have tried all baud rates from 4800 through to 115200 and none make a difference.

I have been trawling many sites looking for clues and have seen some commentary regarding clock speeds - which I have tried to reduce from 240 MHZ through to 10 MHZ - to no avail.

I am comfortable that there are no cross talk issues on the RX/TX lines from the GPS to the ESP32S3.

This one has me slightly stumped. As I said, I am getting something from the GPS and it does look like a baud rate issue, but again, changing rates hasnt helped.

Any help is greatly appreciated.

The program is:

Code: Select all

#include <HardwareSerial.h>

HardwareSerial MySerial(1);  // Using UART 1 with custom pins 
const int MySerialRX = 11;
const int MySerialTX = 10;
#define BAUD 9600

void setup() 
{
    Serial.begin(115200);
    MySerial.begin(BAUD, SERIAL_8N1, MySerialRX, MySerialTX, false);
}

void loop() 
{
    while (MySerial.available() > 0) {
        char byteFromSerial = MySerial.read();
        Serial.print(byteFromSerial);
    }  
}




username
Posts: 536
Joined: Thu May 03, 2018 1:18 pm

Re: UART / Serial Garbled

Postby username » Fri Nov 08, 2024 10:00 am

A couple things come to mind.
Is your GPS putting out RS232 signal levels which swing from + to - voltages, or TTL levels.
If TTL levels, are they 5v or 3,3v levels ?

You need to confirm this first.
If the levels are logic 3.3v then I would connect it to your favorite terminal program and make sure its sending data properly.

Who is online

Users browsing this forum: No registered users and 71 guests