I am using the simple serial socket examples available at:
I cannot find where the Uart receive timeout has been set. Seems to be set to an endless wait but (luckily) that's not the case.
Any hints?
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.
I am using the simple serial socket examples available at:
I cannot find where the Uart receive timeout has been set. Seems to be set to an endless wait but (luckily) that's not the case.
Any hints?
Hi Giovanni,
The uart read timeout is part of the UART_Params set in the init function of the simple serial socket examples. As you can see the read timeout is not explicitely set, so the default value is used. The default value is UART_WAIT_FOREVER. (You can set it to something else if you wish.)
/*! * @brief UART Parameters * * UART parameters are used with the UART_open() call. Default values for * these parameters are set using UART_Params_init(). * * @sa UART_Params_init() */ typedef struct { UART_Mode readMode; /*!< Mode for all read calls */ UART_Mode writeMode; /*!< Mode for all write calls */ uint32_t readTimeout; /*!< Timeout for read calls in blocking mode. */ uint32_t writeTimeout; /*!< Timeout for write calls in blocking mode. */ UART_Callback readCallback; /*!< Pointer to read callback function for callback mode. */ UART_Callback writeCallback; /*!< Pointer to write callback function for callback mode. */ UART_ReturnMode readReturnMode; /*!< Receive return mode */ UART_DataMode readDataMode; /*!< Type of data being read */ UART_DataMode writeDataMode; /*!< Type of data being written */ UART_Echo readEcho; /*!< Echo received data back */ uint32_t baudRate; /*!< Baud rate for UART */ UART_LEN dataLength; /*!< Data length for UART */ UART_STOP stopBits; /*!< Stop bits for UART */ UART_PAR parityType; /*!< Parity bit type for UART */ void *custom; /*!< Custom argument used by driver implementation */ } UART_Params;
For more info please see the UART driver documentation: