cancel
Showing results for 
Search instead for 
Did you mean: 

How to recover UART RX with DMA after Frame or OverRun error.

MAnto.2
Associate II

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.

0 REPLIES 0