UART baudrate sensitivity

Posts: 1
Joined: Wed Nov 22, 2017 3:30 pm

UART baudrate sensitivity

Postby ashsom » Wed Nov 22, 2017 3:45 pm

I am trying to connect my ESP32 to with another microcontroller unit over UART. The other controller is 8bit STM chip which has internal crystal that's not very accurate (+/- 5% tolerance) causing the baudrate to vary with same range (+/- 5%). It also has an option to have an external crystal which would be much more accurate. To decrease the BoM, it'd be ideal to use and internal crystal.

I tried to find about acceptable baudrate deviation for ESP32 at which it still would be able to receive data reliably, but could not find any information. When I searched about baudrate tolerances in UART in general, I found answers ranging from 1% ro 5%, which was not very conclusive.

My question is, if I have a baudrate of 4800 at ESP32 and due to tolerance of the crystal at the other microcontroller, it sends data at baudrate of say, 5000, would it still be treated ok at ESP32 or I should expect some bytes affected by the mismatch? In short, when ESP32 is receiving data, what is the sensitivity for the baudrate if I am using UART peripherals?

Thank you.

User avatar
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: UART baudrate sensitivity

Postby kolban » Sat Mar 10, 2018 11:41 pm

Does your 8bit STM chip advertize itself as being able to communicate with UART or are you driving it manually yourself? I'd hope that if a device advertises UART support it would also declare its maximum supported speed and honor that. It may be that the data sheet declares restrictions and improvements when using the internal clock vs an external crystal.
Free book on ESP32 available here:

Posts: 79
Joined: Tue Apr 26, 2016 5:10 am

Re: UART baudrate sensitivity

Postby Lucas.Hutchinson » Tue Mar 13, 2018 8:25 pm

You might have to test out when the baud rate mis-match starts causing issues between the two processors.

Usually the lower the baud rate, the less of an issue this is.
4800 baud is pretty slow so you should be fine.

Who is online

Users browsing this forum: OllieK and 36 guests