Identifying and solving UART error.
I am using a Nucleo GO70RB along with an ESP to control electrical appliances by sending commands to the ESP through the server and transmitting the said commands to STM32 using UART which is configured in normal DMA mode.
I am able to control the appliances through the server until I soft reset the ESP (in case of WiFi credential exchange or stream timeout) after which the STM32 stops responding to the commands sent by the ESP. The ESP is successfully printing the commands on the COM Port and is transmitting data to the ESP, due to some reason the STM32 is not responding to those commands or receiving those commands.
I am using a HAL_UART_ErrorCallback function to determine the type of error in case of a soft reset. In the function I am reading the ORE bit, PE bit, NE bit and RXFF bit of the USART ISR register none of which are are returning 1 to display any sort of error, however the code is executing HAL_UART_ErrorCallback function upon soft reset, as I have defined a global variable Error_count and initialized it to 0, every time the code executes the HAL_UART_ErrorCallback function the Error_count increments by 1.
I can not seem to identify the problem, can someone guide me in relation to this issue.
