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.

TMS570LS0714: Enable SCI buffer after idle state

Part Number: TMS570LS0714
Other Parts Discussed in Thread: HALCOGEN

Dear TI Team

I am working with the TMS570LS0714 PZ package and use the SCI2 RX (LIN) pin to only receive the data send by a sensor resp. the transceiver inbetween.
Each frame is send at a rate of 10kHz and is defined as 6 bytes (1 stop, 8 data bits, no parity):




Given that: The baudrate is 921600 bit/sec, 8 bit data words, 1 stop bit, no parity, frame transmitted at 10KHz. One frame has 6 bytes:
This means:
- The time to send one byte is      (1/921600)*(8data+1 stop+1 start) = 10.85usec
- The time to send all six bytes is (1/921600)*(8data+1 stop+1 start)*6 = 65.1usec
- The idle state (waiting time at high level until next frame) is (1/10kHz) - 65.1usec = 35usec

You can see that after the six bytes are transmitted, the data stream is set to high (idle state) until the next frame is send.
My question is:
Is it possible to somehow trigger the buffer in such a way to start reading the data after the idle state is finished?
I use the following command to receive the data "sciReceive(scilinREG, 6, &sci_cmd[0]);" in "sciNotification"
I have currently the problem that

1. the data bytes are randomly stored in sci_cmd (for example byte 1 is stored in sci_cmd[3])

2. the idle state is stored in some cases in sci_cmd -> 1111 1111 (which should not be the case)

Would be nice to hear your opinion. Thank you!

  • The SCI transfers data byte by byte. 

    The receive ready (RXRDY) flag is set when the SCI transfers newly received data from shift register (SCIRXSHF) to data buffer (SCIRD). The RXRDY flag therefore indicates that the SCI has new data to be read. If the SET RX INT is set, a receive interrupt is generated. The received data can be read in the Interrupt Service  routine.

    The HALCOGen generates the SCI RX interrupt service routine. The 1st received data should be copied to CMD[0], and the 2nd received data should be copied to CMD[1], ... 

  • Is it possible to somehow trigger the buffer in such a way to start reading the data after the idle state is finished?

    In SCI mode you might be able to use Idle-Line Multiprocessor Communication Format. From the TMS570LS09x/07x 16/32-Bit RISC Flash Microcontroller Technical Reference Manual (Rev. A) :

    Since the 1st byte in in a frame has D7 set, and D7 is clear in the remaining 5 bytes of a frame, another possibility is to synchronise in software by just reading one byte at a time and detecting the start of a frame when D7 is set.

  • Dear Chester
    Thank you for the answer! Your first proposed solution is the more elegant way. So far I only tried my above code + a sorting of the data based on the first bit of the byte and your second solution, both work. I will try to implement solution one in the future.