I increased my baud rate from 56000 to 115200 and my serial communication stops working when pinging continuously after 10-20 seconds. I am running at 16 MHz.
As far as I know HAL driver will handle overrun, among other errors by clearing the flag and calling the error callback function. If that is the case then if I get an overrun due to the increase in speed it should be cleared and my communication should continue working after that.
I have found also that increasing processor speed to 32 MHz "fixes" the issue but I don't want to rely on that. Perhaps it just takes much more time for the error to come.
Is my understanding correct? Are the UART flags cleared automatically by HAL drivers? Do I need to clear them myself or handle them in some manner? Is there something I am missing?
I basically use HAL_UART_Transmit_IT() and call HAL_UART_Receive_IT() after it finishes and do nothing else.