This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Unable to receive data on UART

Other Parts Discussed in Thread: HALCOGEN, TMS570LS3137

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.

  • 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?

  • 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

  • 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.

  • 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

  • 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.

  • 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

  • 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