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.

TMS320F28388D: Uart receives data sometimes lost

Part Number: TMS320F28388D


My UART baud rate is 7M, the sending and receiving cycle is 1ms. DMA is used for transmission. Since DMA cannot receive variable-length data, fifo interrupt mode is used. Normally everything works fine, when my UART is sending and receiving at the same time, the receiving part is fixedly missing the 17th byte. It feels like the 16-byte fifo is full? Is there a limit on the UART or something else?

  • Hi sw,

    Thanks for your question. Can you try:

    1. Only send to C2000 device with 2-stop bits (need 2 stop bits between each byte)

    2. reducing your UART ISR execution time (make the UART ISR very short)?

    There is a known issue in the SCI module (similar to UART module) that it takes some "detection time" between the FIFO interrupt triggering and the ISR starting. So it basically means you only have 1/8th of a bit to complete the whole ISR or you will miss the 17th byte (or any byte after an interrupt).

    If you fix the above two items and it goes away, please let me know, as this issue is likely not on UART.

    Regards,

    Vince

  • thank you for your reply.
    I tested it again. When an exception occurs, the RX receive interrupt and RT timeout interrupt will not trigger or trigger with a delay. It was not caused by the UART transmit but by interference from my 1ms systick interrupt. How to adjust the rx interrupt priority?

    What I do in the interrupt is to clear the interrupt flag and use the while (UART_isDataAvailable(UART0_BASE)) { UART_readCharNonBlocking();} function to read the fifo data. since my baud rate is very high, 1/8 byte time is not enough to use the UART_readCharNonBlocking function to read all the bytes in the fifo.

    Finally, when I tried changing the RX's fifo rating to smaller than 6/8. The system will enter a crash (Fault_ISR) when it is abnormal