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.

CCS/TMS570LS1224: Transmitting data via SCI ports

Part Number: TMS570LS1224
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

Hello 

I am working with sci module for transmitting data between TMS570LS micro-controller and a sensor and I have searched for examples of functions which do the transmission like sciSend() ...but I realized that these codes can communicate between laptop and micro.Am I correct?

What is the best format  for transmitting data between TMS570LS micro-controller and a sensor?Also how can I set the rx/tx parts in HaLCoGen pin settings?

  • Hello Nika,

    The SCI module has two external pins: SCITX and SCIRX. 

    The SCI transmitter is enabled if both the TX FUNC bit and the TXENA bit are set to 1. SCI waits for data to be written to SCITD, transfers it to SCITXSHF, and transmits the data to SCiTX pin.

    The SCI receiver is enabled to receive messages if both the RX FUNC bit and the RXENA bit are set to 1. After a valid idle period is detected, data is automatically received as it arrives on the SCIRX pin.

    The sciSend() is to send a block of data to the receiver which can be a PC, a sensor, etc. The sciReceive() is to receive a block of 'length' bytes and place it into the data buffer no matter where the data is from.

    Please refer to the HALCoGen example (HalCoGen--Help--Help Topics) for setting SCI module.

  • Hello QJ,

    Thanks for your valuable guidance.The important thing is that you teach me how to fish not giving me fish.

    I checked the Help part of HaLCoGen but did not get this point that if I want to send and receive data, is it correct to first use sciSend() function and then sciReceive() function like the format below?

    #define length1 8
    #define length2  12
    uint16 TX_Data[length1] = { 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08 }; 
    uint16 RX_Data[length2];
    sciInit();
    _enable_IRQ_();
    void sciSend(sciBASE_t *sci, uint32 length1, uint16 * TX_Data);
    void sciReceive(sciBASE_t *sci, uint32 length2, uint16 * RX_Data);