uart: ns16550: add workaround to re-enable interrupts in ISR
In some configurations (e.g. edge interrupt triggers), an interruptible event occurs during ISR and the host interrupt controller does not see the new event due to IIR is constantly asserting interrupts. For example, the callback handles RX and then TX. If another character comes in before end of TX processing (TX interrupt still asserts while raising RX interrupt), the host interrupt controller may not see this new event. So if needed, the IER is being toggled to re-assert interrupts at the end of ISR to nudge the host interrupt controller to fire the ISR again. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
cf3dabedaf
commit
ef0d955758
2 changed files with 24 additions and 0 deletions
|
@ -871,6 +871,12 @@ static void uart_ns16550_isr(const struct device *dev)
|
|||
dev_data->cb(dev, dev_data->cb_data);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_UART_NS16550_WA_ISR_REENABLE_INTERRUPT
|
||||
uint8_t cached_ier = INBYTE(IER(dev));
|
||||
|
||||
OUTBYTE(IER(dev), 0U);
|
||||
OUTBYTE(IER(dev), cached_ier);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue