From d27842c9536e62fb21bc49bd425928e35d2af849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Thu, 4 Apr 2024 15:07:45 +0200 Subject: [PATCH] drivers: serial: nrfx_uarte2: Clean error state on rx_enable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clean error state on re-enabling RX. If previous transmission ended with an error it should not impact next receiving session. Signed-off-by: Krzysztof Chruściński --- drivers/serial/uart_nrfx_uarte2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/serial/uart_nrfx_uarte2.c b/drivers/serial/uart_nrfx_uarte2.c index cf109c32d8e..f052c1fb742 100644 --- a/drivers/serial/uart_nrfx_uarte2.c +++ b/drivers/serial/uart_nrfx_uarte2.c @@ -497,6 +497,7 @@ static int api_rx_enable(const struct device *dev, uint8_t *buf, size_t len, int * flags are already known to the driver (e.g. if flushed data shall be * kept or not). */ + adata->err = 0; adata->en_rx_buf = buf; adata->en_rx_len = len;