This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF_DRV_UART_EVT_ERROR issue

I'm using the UART driver (drv_uart.c) provided with the nRF5 SDK 11.0.0 on a nRF52 chip and once a NRF_DRV_UART_EVT_ERROR event is received, the receiver seems to be stuck and no more data comes from the UART.

By looking deeper on the driver code, I realized that the NRF_UART_INT_MASK_RXDRDY interrupt flag is disabled by the IRQ handler (nrf_drv_uart.c, line #694) and is never re-enabled. Adding the following code line at the end of the handler solved the issue:

nrf_uart_int_enable(NRF_UART0, NRF_UART_INT_MASK_RXDRDY | NRF_UART_INT_MASK_ERROR);

I'm not using the Easy DMA feature, so the legacy code is used.

Am I missing something or is it a driver issue?

Thanks

Related