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.

TMS320C6678: c66x uart receiver time-out

Part Number: TMS320C6678

Dear TI engineer:

I am using uart interrupt.Everthing is OK and I can use uart transmit and receive interrupt normally.

But now I have a problem for how to use time-out interrupt, because I want to determine if the transmission is complete.

the fifo mode and timer-out interrupt have enabled.

and uart reciever  is complete.

What is the condition for IIR INTID to equal 0x6?( time-out interrupt)

Regards,

Minister

  • Hi,

    From reading the UART user guide: 

    INTID 6 is: Receiver time-out

    FIFO mode only: No characters have been removed from or input to the receiver FIFO during the last four character times (see Table 2-4), and there is at least one character in the receiver FIFO during this time.

    So, if you don't read the characters from the Rx FIFO or nothing received into the FIFO for a while, you should see the timeout and trigger interrupt.

    Regards, Eric

  • HI Eric:

    I have referred to this user guide.There's a problem here,

    On the upper computer, I used the uart to send 22 bytes of data as a test.

    In the FCR,RXFIFTL,I set FIFO to 1byte mode,I can receive the data with 22Bytes,

    When I set FIFO to 4bytes mode,I can only receive 20bytes.I can understand why this is happening. So I lost 2 bytes,and INTID is 0x6.

    When I set FIFO to 8bytes mode,,I can only receive 16bytes,The phenomenon and the principle are the same as above.

    As you mentioned above,"if you don't read the characters from the Rx FIFO or nothing received into the FIFO for a while".The first half of the sentence I can prove correctly.I can't prove the latter.Because now I'm in 1-byte mode and I've sent 22bytes, he's not in timeout mode.

    I can't use FIFO mode for other bytes because I'll lose data.

    Do I have the wrong configuration?

    Regards, Minister

  • Hi,

    You may look at pdk_c667x_2_0_16\packages\ti\drv\uart\test\src\main_uart_test.c:

    #define UART_TEST_ID_DMA_RXERR 6 /* UART DMA RX error test */
    #define UART_TEST_ID_RXERR 7 /* UART non-DMA RX error test */
    #define UART_TEST_ID_DMA_CANCEL 8 /* UART DMA read write cancel test */
    #define UART_TEST_ID_CANCEL 9 /* UART non-DMA read write cancel test */

    If one of above is the test case you are looking for.

    Regards, Eric