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

Queuing UART incoming data in nRF52

Hi,

I am using ble_app_uart sample code for testing. In that I want to store the incoming data into to three buffers and simultaneously sending this over BLE. i.e., consider my buffer is 100 bytes size,my incoming data is 1000 bytes. I want to store first 100 bytes on buff1 and then buff2, buff3. Once the buffer1 is filled it has to send, it should not wait for other buffers to fill. This should be happen continuously. Is this possible with nRF52? and how to do?

Parents
  • Why do you need 3 buffers ? Why can't you just have a ring buffer that simply send via BLE when it reaches 100 bytes ? You can just have a big array 1000bytes for example, count the number of byte stored in the buffer, when it reach 100 , you start to send UART, keep counting if more bytes on UART arrive, and send again when another 100 byte reaches.

Reply
  • Why do you need 3 buffers ? Why can't you just have a ring buffer that simply send via BLE when it reaches 100 bytes ? You can just have a big array 1000bytes for example, count the number of byte stored in the buffer, when it reach 100 , you start to send UART, keep counting if more bytes on UART arrive, and send again when another 100 byte reaches.

Children
No Data
Related