Page 1 of 1

UART baudrate sensitivity

Posted: Wed Nov 22, 2017 3:45 pm
by ashsom
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.

Re: UART baudrate sensitivity

Posted: Sat Mar 10, 2018 11:41 pm
by kolban
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.

Re: UART baudrate sensitivity

Posted: Tue Mar 13, 2018 8:25 pm
by Lucas.Hutchinson
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.