Check UART errors when calling "uart_read_bytes"
Posted: Tue Jun 22, 2021 1:02 pm
Hello,
For a project I'm interested in detecting when some errros exist in the UART.
I have found this struct:
That I can use to detect for example Parity Error or others.
But I just finding that this struct is accessible only when using UART through events(https://github.com/espressif/esp-idf/tr ... art_events).
So, is there a way to get if UART has Parity Error (for example) on polling? Or at the same time that uart_read_bytes is called?
Thanks
For a project I'm interested in detecting when some errros exist in the UART.
I have found this struct:
Code: Select all
typedef enum {
UART_DATA, /*!< UART data event*/
UART_BREAK, /*!< UART break event*/
UART_BUFFER_FULL, /*!< UART RX buffer full event*/
UART_FIFO_OVF, /*!< UART FIFO overflow event*/
UART_FRAME_ERR, /*!< UART RX frame error event*/
UART_PARITY_ERR, /*!< UART RX parity event*/
UART_DATA_BREAK, /*!< UART TX data and break event*/
UART_PATTERN_DET, /*!< UART pattern detected */
UART_EVENT_MAX, /*!< UART event max index*/
} uart_event_type_t;
But I just finding that this struct is accessible only when using UART through events(https://github.com/espressif/esp-idf/tr ... art_events).
So, is there a way to get if UART has Parity Error (for example) on polling? Or at the same time that uart_read_bytes is called?
Thanks