Program hits NRF_DRV_UART_EVT_ERROR randomly at high frequency using UART

Hello, I'm using nrf52832, my own custom board, the UART pins are 10 out, 9 in, no stop bit, no parity and no hardware flow control, baud rate 115200.

Ever so often, in \nRF5_SDK_14.2.0\components\libraries\uart\app_uart_fifo.c, the program runs randomly it seems, into

    case NRF_DRV_UART_EVT_ERROR:					
            app_uart_event.evt_type                 = APP_UART_COMMUNICATION_ERROR;
            app_uart_event.data.error_communication = p_event->data.error.error_mask;
            (void)nrf_drv_uart_rx(&app_uart_inst, rx_buffer, 1);
            m_event_handler(&app_uart_event);
            break;

I can receive my desired data just fine, if I completely ignore this.

My question is, does this actually pose a problem? As in it generates a lot of "waste data" in which case my actual communication speed isn't 115200, it's slower? That would be unacceptable because my entire system is highly time-critical.

If that indeed is true, how do I solve it? What could be the probable cause? I'll provide any update if desired.

Thanks in advance!

  • Hi

    First off, I see that you're not using flow control, which in general helps preventing these kinds of issues. Any specific reason you don't? If the application is time critical, I would strongly recommend enabling HW flow control. What is your board connected to over UART?

    I also see you use pins P0.09 and P0.10 which are NFC pins by default, but these can be set to GPIOs which I assume you have done as it works at all.

    Best regards,

    Simon

Related