samd/machine_uart: Fix lock-up in loopback mode if read buffer is full.

Signed-off-by: robert-hh <robert@hammelrath.com>
This commit is contained in:
robert-hh
2025-03-09 11:39:12 +01:00
committed by Damien George
parent 6db7b47ab9
commit 4dfee50a0b

View File

@@ -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) {