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/TMS570LS1227: TMS570 : Using SCI Transmit Interrupt Error related, continuous 1byte Transmit Problem

Part Number: TMS570LS1227
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

Problems occurring

At the time of data transfer, sometimes first data is continuously transmitted.

For example

- Data make

for(u=0; u<64; u++)

sciSend(sciREG,64,x[u]);

---------------------------------------

- Data Transmit(Main while loop)

sciSend(sciREG,1,x[i]);

i++

if( i ==64)

{

i=0;

}

---------------------------------------

When sending 64 bytes, after sending the intended data, the data at address 0 is sometimes copied to the next 8 addresses.
It is confirmed that this phenomenon occurs periodically.

-------------------------------------------------------------------------------------------------------------------

The cause of the problem I grasped is SCI TX Interrupt Set.

Halcogen : VIM SCI Level 0 Interrupt set , SCI Interrupt enable and High Level set

scisendbyte() => TX Interrupt running and Interrupt clear => Wait scisendbyte()

-------------------------------------------------------------------------------------------------------------------

sci TX Interrupt set is added inside the used scisendbyte() function.

This is because an interrupt does not occur when used as a provided function.(spnu515 See section 30.3.1)

USER CODE BEGIN : sci->SETINT = (uint32)SCI_TX_INT;


It is running without any problem with TX interrupt disabled.

I want to know if the usage is correct.

*Only SCI communication is available. It cannot be changed to LIN2.*

  • Hello,

    sciSend() doesn't call sciSenByte().

    1. TX Interrupt is generated only after the first transfer from SCITD to SCITXSHF. That is, the first data has to be written to SCITD by the User before any interrupt gets generated. This is why the 1st byte is copied to SCITD register in sciSend() function.

    2. Writing data to the SCITD register clears the TXRDY bit. But the transmit ready (TXRDY) flag is set when the SCI transfers the contents of SCITD to the shift register SCITXSHF. The TX interrupt is generated only when the TXRDY is set (high).

    The sciSend() reads the data from you specified address only, and will not change the data at the address. I think the data is overwritten by your code.

  • 2.  Functions provided, Let's do it using sciIsTxReady() function!!.

    The result confirmed again.

    If one byte is repeatedly sent using the sciSend() function.(Test Condition SCI TX Interrupt enable)

    While executing a 1-byte transfer instruction, data is sometimes sent many times.(Not to change other address values...)

    EX)  Symptom example -------------------------------------------------

    Receive : 0x0a   

    Sending : 0x41

    Receive : 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a

    Sending : 0x41

    Receive : 0x0a

    Sending : 0x41

    ----------------------------------------------------------------------------------

  • There is no problem with the sciSend() function. This is my test which send "H" for 100 times, and the receiver (TeraTerm) prints the received letter. Interrupt mode is used.