• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Microcontrollers » Stellaris® ARM® Microcontrollers » Stellaris® ARM® LM3S Microcontrollers Forum » We set the LM3S9D92 UART1 as standard RS232 for communication, but find some baudrate are offset some from the value we set.
Share
Stellaris® ARM® Microcontrollers
  • Forum
Options
  • Subscribe via RSS
Helpful Stellaris® LM4F Series Links
  • LM4F Series
  • Stellaris PinMux Utility
  • Stellaris® LM4F120 LaunchPad
  • LM4F MCU Applications
  • LM4F MCU Video
  • ARM Cortex-M4F Whitepaper
  • Stellaris MCU Brochure
  • LM4F232 Eval Kit
  • Forums

    We set the LM3S9D92 UART1 as standard RS232 for communication, but find some baudrate are offset some from the value we set.

    This question is not answered
    huang hua
    Posted by huang hua
    on Mar 19 2012 01:57 AM
    Prodigy20 points

    And we do some calcuation and detection as follows:

     

    MCU: LM3S9D92/UART1
    Work power supply: +3.3V
    Formula(from lm3s9d92.pdf page 692):
    BRD = BRDI + BRDF=SYSTEM_CLK/(UART_DIV*BAUDRATE)
    BRDF_REG_VALUE = INT(BRDF*64 + 0.5)
    Some parameters:
    SYSTEM_CLK 50000000 Hz
    UART_DIV 16
    ONE_BYTE_BITS 10
    BRDF_DIVIDER 100
    EXTERNAL_CLK 16000000 Hz
    Basic calculation real value detected by oscilloscope
    Standard baudrate BRD BRDI BRDF BRDF_REG_VALUE BRD_Select Get baudrate Baudrate offset Baudrate error(%) one byte error(%) Detected by oscilloscope Oscillo – standard Oscillo – standard(%) One byte last bit error(%)
    1200 2604.17 2604 0.1667 11 2604.1100 1200.03 0.03 0.0022 0.02 1163 -37 -3.08 -30.83
    2400 1302.08 1302 0.0833 5 1302.0500 2400.06 0.06 0.0026 0.03 2380 -20 -0.83 -8.33
    4800 651.04 651 0.0417 3 651.0300 4800.09 0.09 0.0018 0.02 4762 -38 -0.79 -7.92
    9600 325.52 325 0.5208 33 325.3300 9605.63 5.63 0.0587 0.59 9616 16 0.17 1.67
    19200 162.76 162 0.7604 49 162.4900 19231.95 31.95 0.1664 1.66 19230 30 0.16 1.56
    38400 81.38 81 0.3802 24 81.2400 38466.27 66.27 0.1726 1.73 38460 60 0.16 1.56
    57600 54.25 54 0.2535 16 54.1600 57699.41 99.41 0.1726 1.73 57480 -120 -0.21 -2.08
    76800 40.69 40 0.6901 44 40.4400 77274.98 474.98 0.6185 6.18 76920 120 0.16 1.56
    115200 27.13 27 0.1267 8 27.0800 115398.82 198.82 0.1726 1.73 114940 -260 -0.23 -2.26
    The oscilloscope is TPS2014 from Tektronix

    Does the offset is normal or not?

    If normal, could you give me some reference data?

    If not, could you tell me why? Or introduce some FAE in Shenzhen, China to contact  us?

    We are looking forwared for your reply!

    Thanks!

    UART baudrate offset
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Stellaris Jordan
      Posted by Stellaris Jordan
      on Mar 19 2012 10:34 AM
      Intellectual800 points

      Huang,

      To my knowledge, there should not be any offsets to the actual UART baud rate other than those caused by the fractional divider.  Can you go into more detail concerning your process for measuring the baud via oscilloscope?  It's been a bit of time since I've scoped out a UART line, but my experience has been that it tends to be very close to the calculated offset.  I would be interested in taking some measurements myself to verify what you are saying, but I'd like to follow the same procedure for measurement as you are currently using.

      I had an additional question about the table of data that you posted as well: I'm not certain what you mean in the last column, that you have labeled "One byte last bit error(%)."  Could you go into detail as to what you mean by this?

      Also, I'm curious about your intended use for this UART.  It was my understanding that most RS232 devices had a tolerance of around 2 or 3%.  With the exception of the results you saw on the 1200 baud rate, it seems like the deviations you're observing would be well within that range.

      -Jordan

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • huang hua
      Posted by huang hua
      on Apr 15 2012 21:02 PM
      Prodigy20 points

      Hi Jordan

      First the "One byte last bit error(%)."  we use the "N,8,1", so one byte actual transmit 10bits time, just forget it.
      I use the UART1 and UART2 in one MCU to do communication itself directly, and the results as follows:
       
      parity/frame
      Baudrate 0 = 8, E, 1 1 = 8, O, 1 2 = 8, N, 2 3 = 8, N, 1
      0 = 1200 OK
      1 = 2400 OK
      2 = 4800 OK
      3 = 9600 OK
      4 = 19200 OK OK OK OK
      5 = 38400 NO
      6 = 57600 OK*
      7 = 76800 NO
      8 = 115200 OK*
      Note: * sometimes is failed
       
      Connections: UART1_TX to UART2_RX; UART1_RX to UART2_TX;
      Could you do the same test as above? Thanks!
       
      By the way, we actual application is UART1+RS485 IC(ADM2587EBRWZ)<==> RS485 BUS <==>RS485 IC(ADM2587EBRWZ)+UART2
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use