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.

TMS320F280039: how to read SCI fifo data when data length is unknown and over 16

Part Number: TMS320F280039

Tool/software:

Hi Expert,

My customer are using SCI fifo, baud rate up to 921600, they configure SCI fifo level to 16, and read the fifo data in sci interrupt.

however, there data length is unknow and may be up to 23 byte or more, 

as F28P55x SCI does have DMA support, and readChar with fifo level 1 is not acceptable because this will lead to too high frequency of sci interrupt.

Any suggestion for this use case when sci data length is unknown?

  • Hi Strong,

    Here are a few options:

    • Use a polling-based approach rather than an interrupt-based approach. This would involve continuously polling the RXFFIL flag inside the background loop - would be better if most of the hgh priority program execution happens in other ISRs
    • Configure the transmitting device to send a break detect signal after each x number of bytes sent. For this case you could use a BRKDT RXERROR interrupt to read y amount of bytes left in the RX FIFO at that point (where y = x % 16).

    Let me know if either of these would be feasible for the customer.

    Best Regards,

    Delaney