SMT32 HAL UART crash on possible overrun
What happens is that I have the overrun error as my microcontroller cannot keep up with everything. There's a strange combination of overrun and RXNE that is not handled in HAL UART and will just make HAL_UART_IRQHandler() to get stuck being called all over.

I have found a link here explaining a bit.

Here's the code I added (slightly modified for STM32L0 series) under HAL_UART_IRQHandler() right before the  /* If some errors occur */ comment:

  if( ((isrflags &amp; USART_ISR_ORE) != RESET) &amp;&amp; ((isrflags &amp; USART_ISR_RXNE) == RESET) )
  {
    __HAL_UART_CLEAR_IT(huart, UART_CLEAR_OREF);
    huart-&gt;ErrorCode |= HAL_UART_ERROR_ORE;
    return;
  }


And just be sure you modify the HAL_UART.c file you actually compile!