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

nRF52 UART locks up after OVERFLOW error

Hi!

I'm using an NRF52 with app_uart. As expected at 115200 baud rate, I occasionally get overflow errors which I can see in my event handler.

However, after these errors the UART no longer receives any characters and is broken until I reinitialise it.

In nRF51 it seems you could write UART_ERRORSRC_OVERRUN_Clear to the error flags to clear the error, but the enum doesn't exist on nRF52 and there seems to be no mention of it in the docs. Looking at nrf_drv_uart it seems like it may clear the error flags, but then also disable interrupts.

So, if you're using app_uart to receive in an IRQ, what are you supposed to do in order to keep receiving even after getting an overflow event (this is with SD 3.0.0).

I should probably swap to app_uart_fifo - however I may very occasionally get overflows there and I want to be sure that the UART will keep working even in that case before I move to using fifos.

Thanks!

Related