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.

UART readtimeout on CC3200 and TI-RTOS driver

Hello,

I would like to know how can I tell if a readtimeout has occured. Does the program continue execution after UART_read()? Does it jump to the callback function?

Thank you in advance.

  • Hi Rodrigo,

    When a timeout occurs (driver in BLOCKING mode) UART_read() will return the amount of bytes that were received until the timeout.  Meaning if no bytes are received, UART_read() will return 0, if 6 bytes are received UART_read() will return 6 and so on.  If the driver is used in TEXT mode, it will return the amount of data received including the '\r' character.  User provided callbacks are not executed when using the driver in BLOCKING mode.  

    Timeouts are not supported in CALLBACK mode.  Whenever the UART_read() has obtained all data (or a '\r' is received in text mode) it will call the User provided callback.  The amount of data read is passed in to the User callback via the size_t count parameter.

    Hope this helps,

    -- Emmanuel