Skip to content

Commit

Permalink
Merge pull request #1608 from MultiTechSystems/f4-serial-overrun
Browse files Browse the repository at this point in the history
avoid getting stuck in serial IRQ if ORE is set without RXNE
  • Loading branch information
0xc0170 committed Mar 14, 2016
2 parents 9db204b + 68b0345 commit 2144dad
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit 2144dad

Please sign in to comment.