stm32/usbuart: Clear USART_ICR if provided.
Otherwise endless interrupts happened.
This commit is contained in:
parent
90534b3cf6
commit
7f1a560288
|
@ -399,8 +399,15 @@ void USBUSART_ISR(void)
|
|||
usart_recv(USBUSART);
|
||||
|
||||
/* If line is now idle, then transmit a packet */
|
||||
if (isIdle)
|
||||
if (isIdle) {
|
||||
#if defined(USART_ICR)
|
||||
USART_ICR(USBUSART) = USART_ICR_IDLECF;
|
||||
#else
|
||||
/* On the older uarts, the sequence "read flags", "read DR"
|
||||
* as above cleared the flags */
|
||||
#endif
|
||||
usbuart_run();
|
||||
}
|
||||
|
||||
nvic_enable_irq(USBUSART_DMA_RX_IRQ);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue