STML4 UART Errors - Generic Catch-all reset
Hi Folks,
I am implementing a HAL/DMA UART TX / RX Routine that waits in a state machine for a line-idle interrupt, parses the inputs and immediately responds to the output.
The routine needs to work flawlessly, and if a UART error occurs, it needs resolving ASAP.
I think the best (safest) approach is a simple catch-all where if any UART error occurs (via the HAL_UART_ErrorCallback) then the firmware will simply disable/reinitialise the USART entirely.
Will such a simple "catch all" reset address:
HAL_UART_ERROR_PE, HAL_UART_ERROR_NE, HAL_UART_ERROR_FE, HAL_UART_ERROR_ORE, HAL_UART_ERROR_DMA, HAL_UART_ERROR_RTO?
I would rather do this than identify individual conditions and resolve them individually.
Does anyone see any issues with this simplistic approach?
regards
