• 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 » LM3S9B90 UART receive wrong data
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
  • LM3S9B90 UART receive wrong data

    LM3S9B90 UART receive wrong data

    This question is not answered
    Barry Mok1
    Posted by Barry Mok1
    on Aug 06 2012 23:21 PM
    Prodigy30 points

    Hi,

     

    I am now using LM3S9B90 to develop our company’s products. I used UART1 ro received data from PC side COM port (a program written by C# that keeps sending data to M3 with 10400 8n1 speed, no s/w and h/w handshaking). The UART1 initialization code of UART1 is as follows:

     

    void uart1(void)

    {

        /* Configure the UART 1. */

        SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD);

        GPIOPinConfigure(GPIO_PD2_U1RX);

        GPIOPinConfigure(GPIO_PD3_U1TX);

        GPIOPinTypeUART(GPIO_PORTD_BASE, GPIO_PIN_2 | GPIO_PIN_3);

     

        SysCtlPeripheralEnable(SYSCTL_PERIPH_UART1);

        SysCtlPeripheralReset(SYSCTL_PERIPH_UART1);

     

        UARTConfigSetExpClk(UART1_BASE, SysCtlClockGet(), UART1_BAUD, (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE));

        //UARTIntRegister(UART1_BASE, uart1_int_handler);

        IntEnable(INT_UART1);

        UARTIntEnable(UART1_BASE, UART_INT_RX | UART_INT_RT);

        //IntPrioritySet(INT_UART1, 0x80);

    }

    Test1:

    I was using pl2303 usb to UART IC from the PC side, the M3 uses MAX3243

    I found there is a problem where the received data is wrong when I set:

    #define UART1_BAUD             10400

     

    However when I set “#define UART1_BAUD   1200”, the data is correct!

     

    Test2:

    Later on, I was using FTDI FT232B usb to UART IC from the PC side, the M3 uses MAX3243.

    Both 10400 and 1200 work perfect!

     

    Also, my colleague used LM3S9B90 in other project that uses UART0 to receive data from PC side. He found that some of the data is wrong (wrong rate is around 1%). He used an original COM port from the PC MatherBoard. He is using 19200 8n1, no s/w and h/w handshaking.

     

    May I ask is there any compatibility issues on UART existed in 9B90?  

     

    Since then, our projects are now getting stuck in the UART issue. Would you please provide any recommendation for us?

     

    BR,

    Barry Mok

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Dave Wilson
      Posted by Dave Wilson
      on Aug 07 2012 15:11 PM
      Mastermind22830 points

      I'm not aware of any UART issues on lm3s9b90 that would affect communication based on the baud rate. From my experience, communicating with a "real" RS232 port, I've seen absolutely no problems unless the Stellaris device system clock is set wrongly and, as a result, the UART baud rate is out of spec. When talking to USB-to-serial devices like the pl2303 you mention, I have seen occasional missed data on the PC side, though. The same code runs fine without any missing data if I talk to a PC with a D9 RS232 connector, skipping the USB dongle. I suspect this is a flow control issue, though, since I typically see blocks of data that are missed rather than corrupted characters as I would expect if the baud rate was slightly wrong.

      All of our code here tends to use 115,200bps so I'm very surprised that you are seeing problems at such relatively low bit rates. Have you verified that your system clocking is definitely correct and that the baud rate on the wire is exactly as you expect (with an oscilloscope, for example)? Are your RS-232 signals clean? Does one of our evaluation or development kits show the same problem when you connect it to the same PC (our lm3s kits use FTDI232 USB-to-serial devices and our new lm4f ones use a Stellaris part to perform the same function)?

      Reading your post again, it seems you are seeing missed data on the lm3s9b90 side. Is all data sent from the 9b90 received correctly on the PC or are you seeing characters missing there too? Are you 100% sure that your software can keep up and no data is being lost in the UART (you are not seeing any receive overrun errors reported)?

      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