Merge pull request #1608 from MultiTechSystems/f4-serial-overrun

avoid getting stuck in serial IRQ if ORE is set without RXNE
pull/1615/head
Martin Kojtal 2016-03-14 16:02:28 +00:00
commit 2144dadad2
1 changed files with 3 additions and 0 deletions

View File

@ -451,6 +451,9 @@ static void uart_irq(int id)
irq_handler(serial_irq_ids[id], RxIrq);
__HAL_UART_CLEAR_FLAG(handle, UART_FLAG_RXNE);
}
if (__HAL_UART_GET_FLAG(handle, UART_FLAG_ORE) != RESET) {
uint8_t c = handle->Instance->DR;
}
}
}