Closed mettatec closed 3 months ago
What happens if you:
void loop()
{
while (MySerial.available() > 0) {
Serial.write(MySerial.read());
}
}
Tried already. Same result
I know for certain that the baudrates work fine. You can try with running Serial at that baud instead of 115200. Is it possible that your GPS requires maybe different UART config? Parity or Stop bits?
Same code with esp32 core V2 works well.
@SuGlider PTAL
The program works OK at 230400 baud. Is there any change in the clock source for UART in new core v3?
The program works OK at 230400 baud. Is there any change in the clock source for UART in new core v3?
Yes, for 3.0.4 we changed the UART clock source to 2MHz (REF_TICK), which seems not to work correctly for 460800.
There is a test for the baud rate. When it is higher than 1 Mbps, it uses this clock source. I'll post a PR limiting it to 250 Kbps for the ESP32 and ESP32-S2, higher than that it shall use APB as clock source.
I did the chage from the PR post (core 3.0.4 in my local files) and it works OK now. Thanks!
Board
ESP32 Dev Module
Device Description
Custom hardware
Hardware Configuration
GPIO 16 and 17 used as UART HardwareSerial
Version
v3.0.4
IDE Name
Visual Studio Code
Operating System
Windows 11
Flash frequency
80MHz
PSRAM enabled
no
Upload speed
921600
Description
HardwareSerial at 460800 does not read data correctly when using ESP32-Arduino Core v3.
Sketch
Debug Message
Other Steps to Reproduce
Tried with ESP32-Arduino Core v2 and it works OK.
I have checked existing issues, online documentation and the Troubleshooting Guide