Skip to content
Commit 2dce408b authored by Josuah Demangeon's avatar Josuah Demangeon Committed by Carles Cufí
Browse files

drivers: serial: uart_liteuart: fix interrupt-driven mode



Interrupt-driven mode was not working, and disabled by default.
When it was forced on, the behavior was to only have a few bytes:
as many as min(CONFIG_SHELL_BACKEND_SERIAL_TX_RING_BUFFER_SIZE, 9).

After the hardware FIFO was filled by software and emptied by hardware,
no interrupt occured, and enqueuing more data did never happen.

By letting the events enabled for TX (only), then interrupts are still
generated after the first transfer, and the software can then add the
subsequent transfers until all data is print: the UART works.

It does not generate endless interrupts either, which was tested by
adding litex_write8('%', UART_RXTX_ADDR) in liteuart_uart_irq_handler()
to log all interrupts events, and when there is nothing to print, no
interrupt is fired.

It was tested with the Zephyr shell.

Fixes #63794

Signed-off-by: default avatarJosuah Demangeon <me@josuah.net>
parent bc08e801
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment