Baud rate above 115200 don't work for esp32

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.

Unknown; used 'em for long time and just stayed with 115200.

If using the Official Espressif core,
GitHub - espressif/arduino-esp32: Arduino core for the ESP32
Espressif has an Official forum here:

ESP32 Arduino - ESP32 Forum

The discrete (achievable) baud rate depends on the clock frequency and UART prescaler. Consult the ESP32 data sheet for available baud rates.

Does your equipment offer a clock signal for synchronous (USART) communication?

I don't think so. Originally this communication line is used with an HC-06, so I only have the TX, RX . Without any kind of additional control (ex: DTR, CTS).
The ESP32 Clock is compatible (40 Mhz) so it should reach 230400 bps. Could it be some software problem? I already tried using the SoftwareSerial library too.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.