Skip to content

Commit d092722

Browse files
committed
fix adafruit#1407 keep receiving in case of error
1 parent ddf0d3f commit d092722

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • ports/nrf/common-hal/busio

ports/nrf/common-hal/busio/UART.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,19 @@ static void uart_callback_irq (const nrfx_uarte_event_t * event, void * context)
8181
}
8282

8383
// keep receiving
84-
_VERIFY_ERR(nrfx_uarte_rx(&self->uarte, &self->rx_char, 1));
84+
(void) nrfx_uarte_rx(&self->uarte, &self->rx_char, 1);
8585
break;
8686

8787
case NRFX_UARTE_EVT_TX_DONE:
8888
// nothing to do
8989
break;
9090

9191
case NRFX_UARTE_EVT_ERROR:
92-
// Handle error
92+
// Possible Error source is Overrun, Parity, Framing, Break
93+
// uint32_t errsrc = event->data.error.error_mask;
94+
95+
// Keep receiving
96+
(void) nrfx_uarte_rx(&self->uarte, &self->rx_char, 1);
9397
break;
9498

9599
default:

0 commit comments

Comments
 (0)