From 485f593bb75b8228cb2ef5bc1debdceaddfb5c32 Mon Sep 17 00:00:00 2001 From: Krzysztof Chruscinski Date: Mon, 10 May 2021 14:19:11 +0200 Subject: [PATCH] drivers: serial: nrf_uart: Disable uart when fifo_fill not used Driver was failing when interrupt mode was enabled for given instance but interrupt driven TX part was not used. In that case uart was not disabled after sending a byte which resulted in continuous interrupt triggering. Added check for fifo_fill_lock which is set when uart_fifo_fill is used. Signed-off-by: Krzysztof Chruscinski --- drivers/serial/uart_nrfx_uarte.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/serial/uart_nrfx_uarte.c b/drivers/serial/uart_nrfx_uarte.c index 0704a3f45e8..3aeb921b196 100644 --- a/drivers/serial/uart_nrfx_uarte.c +++ b/drivers/serial/uart_nrfx_uarte.c @@ -241,7 +241,7 @@ static void uarte_nrfx_isr_int(void *arg) #ifdef UARTE_INTERRUPT_DRIVEN struct uarte_nrfx_data *data = get_dev_data(dev); - if (!data->int_driven) + if (!data->int_driven || data->int_driven->fifo_fill_lock == 0) #endif { nrf_uarte_int_disable(uarte,