STM32F303 - Clear USART overrun flag if it gets set to prevent CPU usage

hog when using the debugger - no other real-world impact was observed.
This commit is contained in:
Dominic Clifton 2014-05-15 16:58:56 +01:00
parent ed321e3c8d
commit c4ad7402ca
1 changed files with 5 additions and 0 deletions

View File

@ -222,6 +222,11 @@ void usartIrqHandler(uartPort_t *s)
USART_ITConfig(s->USARTx, USART_IT_TXE, DISABLE);
}
}
if (ISR & USART_FLAG_ORE)
{
USART_ClearITPendingBit (s->USARTx, USART_IT_ORE);
}
}
void USART1_IRQHandler(void)