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

NRF_SERIAL_EVENT_RX_DATA never triggered

Hi

I am trying to use the serial library with IRQ and callback function, but the event NRF_SERIAL_EVENT_RX_DATA  is never triggered. No other event than NRF_SERIAL_EVENT_TX_DONE is passed to the callback function. I'm aware of a similar case, https://devzone.nordicsemi.com/f/nordic-q-a/37270/nrf_serial_event_rx_data-never-triggered, but reducing the amount of code in the interrupt handler didn't work for me.

I'm using SDK15.2 

this is the setup:

and the initialization:

and the callback function:

  

Setting a breakpoint at line 6 or line 13 never triggers. 

Data sent (blue) and received (red) look fine

Any suggestion on how to proceed?

  • I changed the callback function to include reading rx data

    and changed the initialization sequence to:

    Now it works!

    It seems like the serial driver didn't cope with the large amount of data just after starting the external device, and somehow disabled the RX interrupt (?) .

  • Great to hear that you found a solution. Did you check the other events in the callback to make sure there were no NRF_SERIAL_EVENT_DRV_ERR/NRF_SERIAL_EVENT_FIFO_ERR events? Could it be that you got some OVERRUN errors, or that the FIFO filled up?

  • I did see OVERRUN error in ERRORSRC when booting/restarting. And the FIFO were probably also overfilled. But still, I was thinking that the Serial driver would recover.... it didn't.  

  • We have put more effort into the Libuarte - advanced UARTE driver library recently. It may be worth checking it out if you are starting a new project.