Libuarte splitting buffer data

Hello,

I'm using the libuarte module to receive and send data. In the NRF_LIBUARTE_ASYNC_EVT_RX_DATA, when the buffer is full, it sends two events with the data split. I know this is by design, but how can I change the code to not allow this to happen? I need the data coming from the UART in one packet. I've seen another post where checking if (0 == p_libuarte->p_ctrl_blk->sub_rx_count), it will get the first part of the data (store into a buffer), and then in the next event, the second part will come. However, even with this implementation, it's causing problems.

Is there any way to either modify the libraries to either only use one buffer, reset the rx index (and any other variables) after every transmission, or to use implement a buffer of some kind to store both parts of the data? I've tried using a ring buffer, but for some reason, it's just not working.

Post I've seen speaking about a similar issue:
LIBUARTE RX Buffer Full event

Parents
  • Hi,

    Is there any way to either modify the libraries to either only use one buffer, reset the rx index (and any other variables) after every transmission, or to use implement a buffer of some kind to store both parts of the data? I

    I don't think this is possible without redesigning the the module considerably. 

    , it will get the first part of the data (store into a buffer), and then in the next event, the second part will come. However, even with this implementation, it's causing problems.

    How is this not working, is it due to the latency of waiting for the second buffer to be filled?

    regards

    Jared 

  • It's causing problems as I expect a full packet at a time, which gets processed later. I've fixed the issue, by putting the data into a buffer.

Reply Children
No Data
Related