avoid getting stuck in serial IRQ if ORE is set without RXNE - issue #1605

pull/1608/head
Mike Fiore 2016-03-11 11:49:03 -06:00
parent f178fc4835
commit 68b034541a
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;
}
}
}