1. We will be in Read Only mode (no new threads, replies, registration) starting at 9:00 EDT for a number of hours as we migrate the forums to upgraded software.

max tolerance in baud rate in usart

Discussion in 'General Electronics Chat' started by aamirali, Jun 4, 2013.

  1. aamirali

    Thread Starter Member

    Feb 2, 2012
    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
  2. MrChips


    Oct 2, 2009
    Use an external crystal.
  3. Papabravo


    Feb 24, 2006
    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
  4. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    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.