I'm receiving data in UART Rx with DMA and I need to make it inmunne to disconnections. Now, sometimes I can recover the communication after a disconnection, but I need to recover it always.
Using the debugger I realized that huart1.ErrorCode change its value from 0 to 2,4 or 6. I guess they are noise, frame and noise+frame(?) errors, and after this error the UART stops.
How can I handle this error with my HAL_UART_ErrorCallback and resume UART communication?
Thank you!
PD: STM32F407VET6