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.

TMS570 SCI problem.

Other Parts Discussed in Thread: HALCOGEN, TMS570LS3137

Hi.

I am using a TMS570LS3137PGE custom board with Keil MDK and Halcogen 2.11.

I am writing a project based on Halcogen.

I enable SCI driver and SCI/LIN driver.

With same setting for the 2 SCI, I only got one of them work.

SCI2 base 0xFFF7E400U works fine but SCI base 0xFFF7E500U not.

I checked the setting in sciInit() and both of them are initialized same way.

Can anybody help me ?

By the way, I can not find SCI base address in user manual nor datasheet, where do I find them ?

Where do I find more example for TMS570 ?

Thank you.

  • Hi Tan,

    Please make sure the board is Keil MCBTMS570 with LCD display and two cards(CPU card, and IO card) tied together. This MDK is for TMS570LS2x rather than TMS570LS3137. I don't remember Keil has MDK for TMS570LS3137.

    For MCBTMS570 MDK, the SCI2 signals are routed on to the U-shap connector directly, the SCI1 are used for SCI-USB communication. You can use the Mini USB connector (XDS100V2) and HyperTerminal to test SCI1. If you want to use U-shap connectors to check SCI1, please populate R69 and R70.

     

    Regards,

    QJ

     

  • Hi QJ Wang !

    It my custom board, not Keil board, sorry making you confuse with "MDK".

    What is always on my mind is why both with the same setting, only one work ?

    I cant find module register base address in user guilde nor datasheet, may be this can be used to solve this problem. 

    Thank you.

  • Hi Tan Dat

    In the data sheet under the section "Memory Map Table" you can find the register base address for all modules ( peripherals and system modules).  The TRM also contains the Base address of the modules just before the register decsription of each modules.

    Note : We have 1 SCI and 1 LIN module in the TMS570LS313x device. LIN module can be configured as SCI module. So if you are using HALCoGen SCI2 ( SCILIN pointer in the driver) is basically LIN module configured as SCI module. We use common driver for SCI and SCI2 ( LIN module configured as SCI) since the register definitions are same( + few addition registers dedicated for LIN which need not be configured if LIN is used in SCI mode).

    So SCI2 base address is LIN Base address.!

    Best Regards
    Prathap

  • Hi, I found out that SCI is not default function for pin 38, 39. We have to set pin mux for these pins. Thank for your answers.

  • i cant use sci2.

    i enabled sci2 driver. i selected HET1 and SCI at PIN MUXING. than i tried to send data same as sci1. but no data sended....

    if you successed, can you share your sci2 example ?

  • Hi

    1)  Which development Board are you using? If you are using HDK / USB based development board they are connected to the USB  connection as UART. SCI2 in HALCoGen is basically LIN Module used in Compatibility Mode.

    2)  LIN pins are not muxed so it does not matter. 

    Please upgrade to latest HALCoGen ( 03.03.01) version. http://www.ti.com/tool/halcogen

    Regards
    Prathap

  • Hi

    I use a TMS570LS31x Hercules Development Kit (HDK).

    I try to make a code from datasheet.

    I writed a code for SCI (UART mode) but it isn't send anything to the terminal.

    My question is: How I can mux the pins? Or I have to mux for use SCI?

    I tried to search, which pins are the Rx and Tx (which connected to the USB connector), but I didn't find anything.

    I used 0xFFF7E000 to the Base address.

    Regards
    Sandor

  • Sandor,

    You can find the schematics on this page:

    http://processors.wiki.ti.com/index.php/TMS570LS31x_HDK_Kit

    The SCI UART that is connected to USB can be seen on sheet 6

     

  • Anthony, 

    Thank you very much for your help.

    I muxed the pins, but I have another problem.

    If I want to send an 'a' letter on SCI, I see on my scope a '0xCF'.
    I try to check with a terminal program (RealTerm) but I don't get anything. 
    I setted the PLL to 90MHz (so the SCI works on 45MHz), I tested and it's work. After then to the SCI I chose the 115200 (real 117188) baudrate.

    I used the next datasheets:
    http://www.ti.com/lit/an/spna124a/spna124a.pdf
    and the chip's datasheet.

    I attached my files ( I wrote these from datasheet).

    0878.target_sci.h1854.target_sci.c

    Thanks and regards,

    Sandor

  • Anthony,

    I found my fault. The SCI/LIN module is work.
    Just, I don't know how can I use this settings to the SCI module to use it with terminal.

    If I just write the another base address (0xFFF7E500 to 0xFFF7E400) ?
    Or have I edit other settings in the registers?
    I found some information about the pin mux, and as I red I haven't mux the pins if I want to use SCI module with USB connector.

    Thanks,

    Sandor

  • Hi Sandor,

    Sorry, I'm a little lost trying to understand the problem.   Would you please explain in a little more detail.
    Where I'm getting lost is between the module is working (1st line) and the actual problem.

    How do you know that the module is working but still have a problem communicating to a PC with it?
    Are you using an oscilloscope or something to check the module pins, and you can see SCI data coming out?  but the PC can't receive it?

  • Sorry,

    Yes I setted the SCI module and I measured it on the N2 pin and I saw the transmitted data.
    But I want to set the another SCI module. (to the USB)

    My question is that, what have I change to use the other SCI module?
    I tried the next:
     - I changed just the base address (from 0xFFF7E500 to 0xFFF7E400) and I commented the pin mux settings.

    But I still can't send anything to the PC (on B7 pin).

    Thanks, 

    Sandor

  • Sandor,

    I think they're really close but may not be exactly the same (when you use SCI/LIN in just SCI mode).

    Why don't you study the HalCoGen template code. 

    For example the file HalCoGen\<version>\drivers\TMS570LS3137ZWT\SCI570v000\sci.c.

    It has initialization code for both of the SCI modules.   It's a 'template' so you have to just ignore  the template variables, but you can compare the differences in the code for SCI and SCI/LIN and maybe this will help you find the problem.

    The other quick check I would do is just write code to toggle the GIO pin of the LIN.  If you can't do that then something is wrong and it's probably at the system level rather than inside the LIN...  Like a pinmux issue or some other top level issue.

     

  • Anthony,

    Thank for your help.

    I found my fault. My fault was that I didn't set the 0. bit of the registers (I changed just these in my code),
    because I red in the datasheet that these are reserved bits.

    I setted these and now it's work.

    But the problem is very intresting for me because the other SCI is worked with my previous settings.

    Thanks for your help,

    Sandor