Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Conditions under which NRF_SERIAL_EVENT_RX_DATA is sent?

OK, a bit of confusion somebody can clear up for me, I hope;

Does NRF_SERIAL_EVENT_RX_DATA get sent when there is ANY data in the RX buffer, or only when the RX buffer is full?

And if the later, does the FIFO keep receiving data during any processing dead time in handling that event?

What I want to do is several reads of differing length as I have a Start of Frame followed by a length, and I would ideally read two characters, extract the length, and then read the rest of them.  However, if I have to take one event per character, the processor is fast enough to manage.  I just need to know which situation I have to expect.

Thanks in advance!!

-Ben Burch

BTR Controls, Inc.

  • Note that the ble_app_uart example doesn't actually echo back the data from the UART. Can you try to debug and see if you get any interrupts in the uart_event_handle() (the APP_UART_DATA_READY event).

    If you don't get any, please try to use both APP_UART_FLOW_CONTROL_DISABLED and APP_UART_FLOW_CONTROL_ENABLED in uart_init. (I don't know what your HW is connected to).

    Have you tried to analyze the UART lines using a logic analyzer? Is there any data on the nRFs RX pin?

    BR,

    Edvin

Related