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.

TM4C129ENCPDT: TIRTOS UART Driver overrun behavior

Part Number: TM4C129ENCPDT

I have a few questions regarding the behavior of the TIRTOS UART Driver when used in blocking mode (`UART_MODE_BLOCKING`):

1) The `UART_read()` documentation says "In UART_MODE_BLOCKING, UART_read() blocks task execution until all the data in buffer has been read" . Which of the following buffers is the documentation referring to:

   a) The driver's circular buffer; or

   b) The buffer provided by the user as an parameter in the `UART_read()` call?

2) What happens if, in between `UART_read()` calls, an overrun happens? Is the buffer overwritten or is the new data discarded? Is there a recommended way to test for such overruns?

3) While blocked in a `UART_read()` call in newline mode (`UART_RETURN_NEWLINE`), what happens if the buffer is filled without a newline being received?

Thanks in advance.

  • Hi,

     I'm not a TI-RTOS expert. With that said, here is my answers. 

    1) The `UART_read()` documentation says "In UART_MODE_BLOCKING, UART_read() blocks task execution until all the data in buffer has been read" . Which of the following buffers is the documentation referring to:

       a) The driver's circular buffer; or

       b) The buffer provided by the user as an parameter in the `UART_read()` call?

    I think it is the buffer provided by the users. 

    2) What happens if, in between `UART_read()` calls, an overrun happens? Is the buffer overwritten or is the new data discarded? Is there a recommended way to test for such overruns?

    From the hardware perspective, the data is lost. 

    3) While blocked in a `UART_read()` call in newline mode (`UART_RETURN_NEWLINE`), what happens if the buffer is filled without a newline being received?

    3) While blocked in a `UART_read()` call in newline mode (`UART_RETURN_NEWLINE`), what happens if the buffer is filled without a newline being received?

    Here is the description. Are you  using UART_DATA_TEXT? Per my interpretation, if you are in UART_DATA_TEXT  mode and the buffer is filled without a newline received then it will continue to block.