USART blocked by Overrun error on my STM32L051
Hi everyone,
I have a broblem regarding USART in overrun occurrence.
In effect the "HAL_UART_IRQHandler" routine is called every incoming char, but this never calls callback routine (SYS_UART_RxCpltCallback).
In debug mode I can see there is an USART_ISR_ORE, in this case this not set huart->RxISR(huart); anymore.
I tried also to disable overrun option, but it doesn't change.
Also I tried to create an error routine to re-initialize UART, see below:
void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart)
{
if (huart->Instance == SYS_UART){
HAL_UART_Init(&huart2);
HAL_UART_Receive_IT (&huart2, &SysUartFifoRx.data[SysUartFifoRx.head], 1);
}
}
Can you help me, please? I'm losing hope ;)
Best regards