• 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 » Embedded Software » StarterWare » StarterWare forum » UART reset affects other uarts on BeagleBone???
Share
StarterWare
  • Forum
Options
  • Subscribe via RSS

Forums

UART reset affects other uarts on BeagleBone???

This question is answered
Gil Crouse
Posted by Gil Crouse
on May 14 2012 14:56 PM
Prodigy60 points

Hey,

I'm working on a StarterWare application using several different UARTS.  Currently I'm using the uartStdio library (on UART0) for printing out messages and debugging and I'm trying to use UART5 for another interface.  My program seems to be running fine reading UART5 and sending data out on UART5, but once I call UARTModuleReset on UART5 during initialization, I no longer get any of the messages I'm sending to the console (UART0).  Anyone have any suggestions for tracking that down?

Gil Crouse

beaglebone AM335x am335x StarterWare gcc
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Gurudutt Bharadwaj
    Posted by Gurudutt Bharadwaj
    on May 15 2012 00:22 AM
    Prodigy625 points

    Hello Gil,

    The behavior you are mentioning of is indeed strange. Any operation on one UART instance should not affect the other UART instances.

    • I understand from your statements that before you called UARTModuleReset() API for UART5, both UART5 and UART0 worked successfully side-by-side. What was the need to reset UART5 instance at this point of time?

    • How are you using the UART5 instance on Beaglebone board? Can you describe you hardware setup in brief?

    Please share any other information which you feel worth sharing and that which will be helpful for us to understand your setup and software better.

    Thanks and Regards.

    Gurudutt.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Gil Crouse
    Posted by Gil Crouse
    on May 15 2012 12:48 PM
    Prodigy60 points

    Turns out my diagnosis was way off base.  The error is a problem accessing the SYSC registers for the UART.  If I run the following program everything is fine.

    int
    main(void)
    {

        unsigned int sysc = SOC_UART_0_REGS + UART_SYSC;
        HWREG(sysc) |= (UART_SYSC_SOFTRESET);

    }

    However, if I try to reset any of the other UARTs (e.g. change SOC_UART_0_REGS -> SOC_UART_5_REGS in the above code) I get some sort of fault and the CPU branches to the address 0x4030fc10. 

    Any ideas?  Thanks.

    Gil Crouse

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Gil Crouse
    Posted by Gil Crouse
    on May 15 2012 15:57 PM
    Prodigy60 points

    Okay, so apparently you need to wakeup the UART modules before you can talk to them.  Talking to UART0 worked because its clock had already been turned on in the boot code, but all the others were off so they needed initializing.  Example code for any other novices out there:

    /* Enable clock for UART5 */

    regVal = (HWREG(SOC_CM_PER_REGS + CM_PER_UART5_CLKCTRL) &
    ~(CM_PER_UART5_CLKCTRL_MODULEMODE));

    regVal |= CM_PER_UART5_CLKCTRL_MODULEMODE_ENABLE;

    HWREG(SOC_CM_PER_REGS + CM_PER_UART5_CLKCTRL) = regVal;

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Gurudutt Bharadwaj
    Posted by Gurudutt Bharadwaj
    on May 18 2012 08:24 AM
    Verified Answer
    Verified by Baskaran Chidambaram
    Prodigy625 points

    Hello Gil,

    It is glad that you resolved the issue on your own. I would like to add few more points to your discovery.

    As you have said, the functional clocks for UART0 are enabled in the Boot code. Thereafter, UART0 would be used for printing some messages on the serial console. Adding to this, we also enable the functional clocks of UART0 in the application. When you used the UART Utility Library, you would essentially have invoked the function UARTStdioInit() before using any other utility functions. This would enable the functional clocks, perform Pin Multiplexing and initialize the UART0 instance. The reason behind enabling UART0 in the application becomes clear when the application is loaded using CCS. The GEL files which does system level configuration does not enable the functional clocks of UART0, unlike the bootloader.

    Please revert for any queries.

    Thanks and Regards.

    Gurudutt.

    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