max tolerance in baud rate in usart

Thread Starter

aamirali

Joined Feb 2, 2012
412
I am using STM32F205 with internal oscillator = 120Mhz having variation from
( -8% to + 4.5% ).


I want to do usart with rx,tx & gnd line at baud rate of 57600 with 8 data bits , no parity , 1 stop bit & flow control -none.

I have read different points on internet all given different tolerances.

What is exact tolerance in baud rate. Do it vary with change in parity,no of stop bits & baud rate itself
 

Papabravo

Joined Feb 24, 2006
21,225
I am using STM32F205 with internal oscillator = 120Mhz having variation from
( -8% to + 4.5% ).


I want to do usart with rx,tx & gnd line at baud rate of 57600 with 8 data bits , no parity , 1 stop bit & flow control -none.

I have read different points on internet all given different tolerances.

What is exact tolerance in baud rate. Do it vary with change in parity,no of stop bits & baud rate itself
I would aim for a baudrate clock that was accurate to plus or minus 2%. My calculation would be as follows:
57,600 * 16 = 921,600
2% of 921,600 = 18,432
So 921,600 + 18432 = 940,032
And 921,600 - 18432 = 903,168

You are better off with shorter frames since you re-synchronize on each character.

Good luck
 

THE_RB

Joined Feb 11, 2008
5,438
Going to 2 stops bits on transmission gives you re-sync after each byte. That will give the best possible syncing.

Your micro spec says ( -8% to + 4.5% ) clock frequency, but that is usually from part to part or for the whole range it can be internally adjusted within.

Once the micro is programmed the clock frequency should be reasonably stable better than a couple percent (which is from temperature variation).

Lots of products use micros without xtals for serial, they just set the baud timing by testing. You can adjust the baudrate up and down, and find the limits where it fails, then set the baudrate right in the middle of that range.

Or you can self-calibrate the baudrate by measuring incoming data.
 
Top