From 4dfee50a0be8d61c79928f7bb11a4b77c485aea1 Mon Sep 17 00:00:00 2001 From: robert-hh Date: Sun, 9 Mar 2025 11:39:12 +0100 Subject: [PATCH] samd/machine_uart: Fix lock-up in loopback mode if read buffer is full. Signed-off-by: robert-hh --- ports/samd/machine_uart.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/samd/machine_uart.c b/ports/samd/machine_uart.c index 85a81660ca..5be38e961c 100644 --- a/ports/samd/machine_uart.c +++ b/ports/samd/machine_uart.c @@ -156,7 +156,8 @@ void common_uart_irq_handler(int uart_id) { } } #endif - } else if (uart->USART.INTFLAG.bit.DRE != 0) { + } + if (uart->USART.INTFLAG.bit.DRE != 0) { #if MICROPY_HW_UART_TXBUF // handle the outgoing data if (ringbuf_avail(&self->write_buffer) > 0) {