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.

SCI UART Communication - Handling big data packets

Part Number: TMS320F28379D


Tool/software:

Hi,

We are using two SCI for UART communication. One SCI is being used for transmission and other SCI is being used for Receiving and they are two separate channels. We have multi data byte structure that we are transmitting and receiving. One transmit packet structure is 100 bytes, similarly, the receive packet structure is 20 bytes, Now, the way we have implemented code is, in the FOR loop, we are transmitting 16 bit data from TXBUF and subsequently sending 100 bytes of data as per the data structure. Similarly, after transmitting the complete packet structure we are then reading 16 bit data using RXBUF and then subsequently reading 20 bytes of data and storing it in an array and then extracting relevant data.

Is there any other optimum way to approach this implementation? because if we have more number of bytes that are required to be sent in a single packet structure, it becomes difficult to scale it, as assuming, I am transmitting data, however,at the same time , I have an incoming data and we have concern that, we might miss the data, as the CPU might still be busy in transmitting the data.

Baudrate : 460800

  • Hello Gautham,

    Please allow another day for me to review your inquiry. Thanks for your patience!

    Best Regards,

    Allison

  • Hello,

    Thanks for your patience. To clarify, are you already using interrupts? If not, I would suggest you could use an interrupt to receive data when it comes in (you can just transmit in the background FOR loop as you currently have). In this way, the data receival will take priority any time data comes in. 

    If you don't have any other interrupts going on in the system, you could implement both RX and TX interrupts. The only note would be to ensure the interrupt priority scheme matches what you want (ensure your SCI module's RX is higher priority than TZ). But what is the nature of the data being sent and received? Is the application requiring continuous transmission of data or only transmission on a certain condition?

    Best Regards,

    Allison