2021-11-23 01:53 AM
Because of nature of my application sometimes I need to disconnect the cable for UART. In tthat case frame error is detected (sometimes noise or overrun). I would like that after reconnection of the cable UART communication comes back.
After reconnection HAL_UARTEx_RxEventCallback doesn't execute anymore.
I tried to reinitialize DMA and UART as shown bellow. All errors go away but HAL_UARTEx_RxEventCallback still doesn't execute anymore.
if(HAL_UART_GetError(&huart1) && test){
MX_DMA_Init();
MX_USART1_UART_Init();đ
test = 0
}
Any suggestions would be helpful.