• 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 » UART in EKS-LM3S3748 and DK-LM3S9B96?
Share
Stellaris® ARM® Microcontrollers
  • Forum
Options
  • Subscribe via RSS

Forums

UART in EKS-LM3S3748 and DK-LM3S9B96?

This question is answered
Binh Thai
Posted by Binh Thai
on Mar 15 2011 14:53 PM
Expert1190 points

Hello Everyone,

I have a simple program that reads from & writes to the UART module 0 (similar to the uart_echo example). It ran fine on the EKS-LM3S3748 with PuTTY (a terminal program) connected to the Virtual COM Port of the ICDI connection. When I deployed the program to the DK-LM3S9B96, it still worked but only partially. For example, it echoed normal characters fine but the white space character was replaced by '0'. Some other characters were messed up too. When changing the target, I also changed the .cmd linking file. 

What do you could possibly caused this?

Thanks a lot,

Binh

 

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Binh Thai
    Posted by Binh Thai
    on Mar 15 2011 15:38 PM
    Expert1190 points

    I'm following up.

    I changed the clock setting from

    SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN | SYSCTL_XTAL_8MHZ);

    to

    SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ);

    and everything worked fine now on the DK-LM3S9B96.

    Can someone please explain for me how the change affected the output of the UART module as described in the 1st post?

    Thank you,

    Binh

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • slandrum
    Posted by slandrum
    on Mar 15 2011 15:43 PM
    Verified Answer
    Verified by Binh Thai
    Mastermind9640 points

    When you changed your system clock settings, you changed the baud rate you were operating at.  The fact that any of the characters echoed OK was more a coincidence than anything.

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Binh Thai
    Posted by Binh Thai
    on Mar 15 2011 15:47 PM
    Expert1190 points

    But after the system clock is set, I have another funciton call,

    UARTConfigSetExpClk(UART0_BASE, SysCtlClockGet(),  baudRate,  (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE  | UART_CONFIG_PAR_NONE));

    with the parameter 'baudRate' to be always 115200, in both cases.

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • slandrum
    Posted by slandrum
    on Mar 15 2011 15:50 PM
    Verified Answer
    Verified by Binh Thai
    Mastermind9640 points

    That second call only works correctly when you have your system clock configured correctly.  If you have a 16MHz crystal, but tell the processor that it's an 8MHz crystal, then all of your clock calculations will be off, including baud rates for UARTs.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Binh Thai
    Posted by Binh Thai
    on Mar 15 2011 15:51 PM
    Expert1190 points

    I see. Thanks a lot.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Betul TURK
    Posted by Betul TURK
    on May 05 2012 13:42 PM
    Prodigy185 points

    Could you share your uart_echo example Binh?

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Binh Thai
    Posted by Binh Thai
    on May 10 2012 09:58 AM
    Expert1190 points

    The uart_echo example is in the TI SDK.

    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