Skip to content
Commit 49bb1637 authored by Paul Sokolovsky's avatar Paul Sokolovsky Committed by Kumar Gala
Browse files

drivers: serial: uart_cmsdk_apb: Fix interrupt-driven operation



1. There's an expectations that TX ready (i.e. TX buffer space
available) interrupt is a level interrupt, i.e. always active
while there's TX buffer space available. In particular, there's
an expectation that after uart_irq_tx_enable(), the TX interrupt
will immediately fire (assuming free TX buffer space is available).
But CMSDK UART interrupt appears to be edge interrupt, firing only
on buffer state change. So, after irq_tx_enable(), we need to
"bootstrap" interrupt processing by calling user-defined ISR
manually (the ISR will see that TX ready to accept a new char,
will write it there, then we'll get interrupt once TX buffer is
ready again).

2. Interrupts should be acknowledges only after user ISR is called,
because the ISR will check the status of interrupts.

3. Update stale comments.

Signed-off-by: default avatarPaul Sokolovsky <paul.sokolovsky@linaro.org>
parent ee9b08d7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment