Skip to content

Commit 4dfee50

Browse files
robert-hhdpgeorge
authored andcommitted
samd/machine_uart: Fix lock-up in loopback mode if read buffer is full.
Signed-off-by: robert-hh <robert@hammelrath.com>
1 parent 6db7b47 commit 4dfee50

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ports/samd/machine_uart.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ void common_uart_irq_handler(int uart_id) {
156156
}
157157
}
158158
#endif
159-
} else if (uart->USART.INTFLAG.bit.DRE != 0) {
159+
}
160+
if (uart->USART.INTFLAG.bit.DRE != 0) {
160161
#if MICROPY_HW_UART_TXBUF
161162
// handle the outgoing data
162163
if (ringbuf_avail(&self->write_buffer) > 0) {

0 commit comments

Comments
 (0)