Skip to content
Commit fea8ee47 authored by Jerzy Kasenberg's avatar Jerzy Kasenberg Committed by Dan Kalowsky
Browse files

tests: drivers: uart: async_api: Fix chain write



This fixes the case where uart_tx() called from tx callback
fill UART output fifo and immediately execute callback again.
This can happen when hardware does not have interrupt for
output FIFO empty and there is no non-blocking way to tell
that transfer finished.
For such case as soon as output FIFO is filled there is
interrupt that informs that more data can be transmitted.
For hardware with 32 byte fifo callback was seen to be
executed recursively 3 times.
That would not be a problem if chained_write_next_buf
was set BEFORE next call uart_tx().

Additionally semaphore max value is increased to 2
to accommodate such case.

Signed-off-by: default avatarJerzy Kasenberg <jerzy.kasenberg.xr@bp.renesas.com>
parent 8186e6cc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment