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.

TMS570LS3137: How to set the receive length or how to ensure the receive frame is complete

Part Number: TMS570LS3137

Hi team,

The current SCI sends a data frame of different lengths via DMA. The receive only allows the receive of a fixed length data frame, but the communication protocol cannot be fixed. It is possible for a customer to receive a data frame of different lengths, so how can DMA be used to determine that the received data is already a complete data frame without knowing the length of the data frame being transmitted? This can be done by a timer that detects the DMA receive mode and a timeout that determines its complete receive, which is not very real-time; some chips have bus-idle interrupts that can tell the receive data is complete, but no similar interrupt is found in TMS570. Does the TMS570LS3137 have a more real-time detection method?

Could you help check this case? Thanks.

Best Regards,

Cherry

  • Hi Cherry,

    I don't have a good way to receive messages with changing frame length. 

  • Hi Cherry,

    You can define a protocol for sender and receiver. For example, the sender transmits "&!" to tell receiver that those are the last word of the message. The receiver needs to check if the received char is "&" or "!".

  • Hi,

    Thanks for your response!

    You can define a protocol for sender and receiver. For example, the sender transmits "&!" to tell receiver that those are the last word of the message. The receiver needs to check if the received char is "&" or "!".

    This approach requires timed detection of the data status of the receive buffer, which is similar to the first one I mentioned, sometimes cannot detect in time in the program design and not real-time enough.

    The customer would like to achieve the second interrupt I mentioned, because there is an empty interval between the frame and the frame, and don't know which data frame is going to be received, which is the unknown length.

    Assuming the chip has a bus-idle interrupt, once the interrupt is generated, that also means the complete frame was received, and the receive buffer is processed based on the receive length, and the bus-idle interrupt is usually triggered again until the bus is idle again after receiving data. So they don't have to know the length of the received frame, and can be processed in a timely manner.

    Is there a similar implementation for the TMS570LS3137? Also, through which register can know the length of data received in the receive buffer? 

    Thanks and Best Regards,

    Cherry

  • Hi,

    May I know is there any updates about the question above?

    Thanks and Best Regards,

    Cherry

  • As mentioned, a fixed length header can be used to specify the length of the data packet, or a special symbol can be used as the indication of the end of the packet.