• 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 » Hercules™ Safety Microcontrollers » Hercules™ Safety Microcontrollers Forum » Unable to receive data on UART
Share
Hercules™ Safety Microcontrollers
  • Forum
  • E2E Wiki
Options
  • Subscribe via RSS

Unable to receive data on UART

Unable to receive data on UART

This question is answered
DWT
Posted by DWT
on Jul 30 2012 20:09 PM
Intellectual260 points

Greetings,

I am using the tms570 HDK. I have configured the LIN module in sci mode. The baudrate is set to 9600. I have a usb to serial converter that I am trying to use to send data to the board. When I measure the output of the usb-to-serial converter before it is connected to the board, I can see all the uart messages being sent out. However, once I connect the board to the converter and try to see the messages, I find that the line (TX from usb-to-serial, LINRX on board) seems to be pulled high the entire time. Any ideas?

Thanks alot.

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Jean-Marc Mifsud
    Posted by Jean-Marc Mifsud
    on Jul 31 2012 22:08 PM
    Verified Answer
    Verified by DWT
    Expert8985 points

    Hi,

    Did you check this other thread talking about SCI?

    http://e2e.ti.com/support/microcontrollers/hercules/f/312/t/149662.aspx

    Please have a look and let me know if this will help.

    Also, are you using HalCoGen to generate your startup and driver code? If yes, can you share the configuration file so I can try to reproduce your issue on my setup?

    Best regards,

    Jean-Marc

    Application Engineer


    If my reply answers your question please click on the green button "Verify Answer".

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • DWT
    Posted by DWT
    on Jul 31 2012 22:57 PM
    Verified Answer
    Verified by DWT
    Intellectual260 points

    Yes sir. I actually did look at that post when I was debugging my code yesterday. I am using an RTOS (uc/OS-II to be exact) in combination with Halcogen to generate some of the driver code. Since I posted this yesterday, I have moved over to trying to use the LIN module (configured in SCI mode) in interrupt mode. I have physically connected the LINTX to the LINRX and then I send out a char and see if the interrupt gets triggered. Alas, I am still having issues because it still does not seem to be working. I have attached a copy of my sci.c file, as well as the receive_data_task, which is the uC/OS-II task that is responsible for sending out a test character. This task also has the sciNotification() callback function, which, if I understood correctly from the documentation, is used to place the code that once wishes to execute upon an interrupt, correct? I simply increment an integer every time the RX interrupt occurs. However, when i pause the debugger after a while, I see that the integer is still equal to 1.  Any help would be appreciated.4863.sci.c3225.receive_data_task.c

    Regards,

    Willis

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jean-Marc Mifsud
    Posted by Jean-Marc Mifsud
    on Jul 31 2012 23:48 PM
    Verified Answer
    Verified by DWT
    Expert8985 points

    Willis,

    I've create a quick project using HalCogen to configure SCI2 with receive and transmit interrupt.

    I did not check this code on hardware, I will do that tomorrow, but this should give you a starting point.

    The SCI2 is setup has 9600 Baud, 8 bits, 2 stops.
    On the HDK board this sci is connected to an FTDI chip that performs a serial port emulation over usb.
    So when your board is connected to a PC, you will have a serial/USB com port available. You can use any Windows terminal emulator on this port to receive and send data. There is no hardware to add or signal to connect.

    Please let me know if this help.

    Best regards,

    Jean-Marc

    Application Engineer


    If my reply answers your question please click on the green button "Verify Answer".

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jean-Marc Mifsud
    Posted by Jean-Marc Mifsud
    on Jul 31 2012 23:49 PM
    Verified Answer
    Verified by DWT
    Expert8985 points

    Willis,

    Here is the project....

    5822.SCI_Receive_Interrupt.rar

    Best regards,

    Jean-Marc

    Application Engineer


    If my reply answers your question please click on the green button "Verify Answer".

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • DWT
    Posted by DWT
    on Aug 01 2012 08:33 AM
    Verified Answer
    Verified by DWT
    Intellectual260 points

    Mr. Mifsud,

    Thank you for the code. I will look it over. I have, in the past, been able to get the SCI module to work perfectly. Unfortunately, I am not having as much luck configuring the LIN Module to support SCI. Would you be able to possibly look at my code and see if there are any noticeable errors. Also, was I correct when I thought sciNotification() is used to contain the code that is called upon the RX interrupt? 

    The last thing that I wanted to check was if I had all the correct source files in my project. As I mentioned I am using uC/OS-II as my main project, and then I used Halcogen and manually imported some of the files. I have only used Halcogen to generate the code for the LIN/SCI module. The source files that I have from halcogen, are sci.c, sci.h, gio.h, and sys_common.h. Do I need any other Halcogen files if I am to use the RX interrupt. 

    Thanks for your help so far.

    Regards,

    Willis

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jean-Marc Mifsud
    Posted by Jean-Marc Mifsud
    on Aug 01 2012 08:45 AM
    Verified Answer
    Verified by DWT
    Expert8985 points

    Willis,

    Which device are you using? Is it a RM48 or TMS570LS3137.

    On Micrium website, they have port for UC.OS-II for both devices (one is big endian the other is little endian)

    I can download one of their port and make a try.
    If you can share your project it will be even easier for me. If you don't want to share on the forum, I can send you my email address.

    Please let me know.

    Best regards,

    Jean-Marc

    Application Engineer


    If my reply answers your question please click on the green button "Verify Answer".

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • DWT
    Posted by DWT
    on Aug 01 2012 10:52 AM
    Verified Answer
    Verified by DWT
    Intellectual260 points

    Mr. Misfud,

    I would very much appreciate if you could send me your email address.  Also, I am using the TMS570 HDK (LS3137).

    Regards,

    Willis

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • DWT
    Posted by DWT
    on Aug 01 2012 16:45 PM
    Verified Answer
    Verified by DWT
    Intellectual260 points

    Mr. Mifsud, 

    I have sent the code to your email address. Thank you very much for your help so far; I greatly appreciate it.

    Regards,

    Willis

    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