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.

TMS570LC4357: SCI communication on terminal

Part Number: TMS570LC4357

Hello everybody,

I am trying to setup a serial communication (SCI) and see the outcome on the terminal, unfortunately I have not been successful. I have two messages but I only see the one from the printf. I have tried with SCI1, 2,3 and 4 without any change. Here is my code:

#include <stdio.h>
#include "HL_sys_common.h"
#include "HL_sci.h"

/* USER CODE BEGIN (1) */
/* USER CODE END */

/** @fn void main(void)
*   @brief Application main function
*   @note This function is empty by default.
*
*   This function is called after startup.
*   The user can use this function to implement the application.
*/

/* USER CODE BEGIN (2) */
#define SCI_PORT sciREG2
/* USER CODE END */


void main(void)
{
/* USER CODE BEGIN (3) */
    uint32_t delay = 0;
    
    sciInit();

    while(1)
    {        
        sciSend(SCI_PORT, 15, "Putty Terminal\n");
        printf("CCS Terminal\n");
        for (delay = 0; delay < 5000; delay++);
    }
/* USER CODE END */
}

I forgot to say, I configured Halogen to use Baudrate of 9600 and Putty uses that baudrate, too. The same with parity bits, stop bits, etc.

Thank you in advance and kind regards,

JG

  • Hi JG,

    If you use the virtual COM port of TMS570 launchpad, the SCI used for this port is SCI1 rather than SCI2. I run your code (changed SCI2 to SCI1) on my TMS570LC4357 launchpad, works.

  • Hello QJ,

    Thanks for your reply. Indeed that has worked today! It is strange as I tried to use sciREG1 yesterday and it did not work. I am wondering if I would need to reset it or something... Not sure...

    Anyway, one last question, please, could you point me out which document should I look in order to see that SCI1 is the one used for the virtual COM?

    Thank you again and kind regards,

    JG

  • Hi JG,

    The board schematics show which SCI signals are routed to USB as virtual COM. The board quick start also contains this information. Anyway, LIN1/SCI is always the first choice for Virtual COM.