From d9f6e999422a1deedcc5c6f82d87171056e646d6 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 11 Jul 2022 13:36:44 -0700 Subject: [PATCH] Fix RP2040 UART It couldn't receive more than 32 bytes in while checking in_waiting because in_waiting didn't turn interrupts back on correctly. Fixes #6579 --- ports/raspberrypi/common-hal/busio/UART.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/common-hal/busio/UART.c b/ports/raspberrypi/common-hal/busio/UART.c index d1ed3ea27a..c06bb21903 100644 --- a/ports/raspberrypi/common-hal/busio/UART.c +++ b/ports/raspberrypi/common-hal/busio/UART.c @@ -311,7 +311,7 @@ uint32_t common_hal_busio_uart_rx_characters_available(busio_uart_obj_t *self) { // The UART only interrupts after a threshold so make sure to copy anything // out of its FIFO before measuring how many bytes we've received. _copy_into_ringbuf(&self->ringbuf, self->uart); - irq_set_enabled(self->uart_irq_id, false); + irq_set_enabled(self->uart_irq_id, true); return ringbuf_num_filled(&self->ringbuf); }