handle UART RX overrun on stm32l1xx

pull/1442/head
U-owner-PC\owner 2015-11-19 16:11:58 -08:00
parent c3901c65ea
commit 31511c97f3
1 changed files with 3 additions and 0 deletions

View File

@ -231,6 +231,9 @@ static void uart_irq(UARTName name, int id)
irq_handler(serial_irq_ids[id], RxIrq);
__HAL_UART_CLEAR_FLAG(&UartHandle, UART_FLAG_RXNE);
}
if (__HAL_UART_GET_FLAG(&UartHandle, UART_FLAG_ORE) != RESET) {
__HAL_UART_CLEAR_OREFLAG(&UartHandle);
}
}
}