Hello
I have equipment transmitting via uart with a baud rate of 1382400 and I would like to read this information through the Serial2 port of the ESP32.
I've tried to set this high baud rate using Serial2.begin(1382400) but I can't read anything.
Using the function to detect the baud rate I can read a maximum of 922190 bauds.
Below is the sketch I used to check the baudrate:
void setup() {
Serial.begin(115200);
delay(100);
Serial.println();
Serial2.begin(0, SERIAL_8N1, -1, -1, true, 11000UL); // Passing 0 for baudrate to detect it, the last parameter is a timeout in ms
unsigned long detectedBaudRate = Serial2.baudRate();
if(detectedBaudRate) {
Serial.printf("Detected baudrate is %lu\n", detectedBaudRate);
} else {
Serial.println("No baudrate detected, Serial1 will not work!");
}
}
void loop() {
// put your main code here, to run repeatedly:
}
The answer I get is as follows:
Detected baud rate is 922190
I managed to communicate between the equipment and the esp32 using a baud rate of 115200.
I changed the baud rate to 230400 and I couldn't communicate anymore. From 230400 no baud rate worked.
The transmitting equipment uses pic 18F4520 and engineering sent me the following information:
- The crystal of the equipment is 11.0592 MHz
- The PLL quadruples this frequency, so the pic's clock is 44.2368 MHz
I connect the tx with the rx , I interconnect the GND. As far as I understand it is not a connection problem because in 115200 it works.
Unfortunately I can't change it to 115200 definitively because it changes other functions of the equipment.
Is this a limitation of ESP32? Could I do something else to test?
Sorry for the long post and language mistakes as English is not my main language and this is my first post too.