Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LIBUARTE RX Buffer Full event

Hello,

I am having an issue with the nrf_libuarte_async librairie.

I am sending data via nrf_libuarte_async_tx and receiving the data properly via the IRQ handler (user implemented). I copy the data received into a buffer and then send a notification to my task that the uart reception is completed and ready for pick-up. However issue arise when the buffer get full. The nrf_libuarte_async generates two NRF_LIBUARTE_ASYNC_EVT_RX_DATA event, the first one to notify that the buffer is full, the second one to notify that the reception is complete. My message reception is now bad as the message is split in two. The first half in the first buffer and the second half in the second buffer.

Here are my questions:

1. How can I determine that the first event is a buffer Full event and not a completed reception event?

2. I cannot change the number of buffer to 1 as it is asserted in nrf_libuarte_async.h (STATIC_ASSERT(_rx_buf_cnt >= 3, "Wrong number of RX buffers");\)

3. Is there a way to use a ring buffer instead of changing the buffer for reception. As a user I dont care that the buffer is full, when you interrupt me to tell me reception is complete I expect that reception is complete. 

I am using the SDK 17.1.0

Thank you,

Vincent

Parents Reply Children
No Data
Related