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

FDS - How can I write binary data to flash while receiving via BLE

Hi community,

for our application (nrf52832 / SDK 12.2) we need to store data received via BLE. The received data is a 25 kB binary blob which by design will be chopped in 20 B chunks to be sent and received via BLE.

Now my question is if somehow it is possible to store these chunks using the fds library as one record? My current understanding of the fds library is that I need to store each received chunk as new record. Ideally I need a pointer to the whole 25kB blob for further processing.

How would you solve it?

Parents
  • fds is more like a library to manage a collection of relatively small pieces of data, i.e. records. I don't believe it might be feasible to use a 25k RAM buffer and write it all at once in fds, in order to do that you'd have to use a virtual page of at least 28k in size and fds would need two of such pages, one for data and one to use as swap.

    I would stick to fstorage for this, it has a simple API and is much more suited for your requirements. There is an example in SDK 14.1 under examples/peripheral/flash_fstorage.

    Regards, emdi

Reply
  • fds is more like a library to manage a collection of relatively small pieces of data, i.e. records. I don't believe it might be feasible to use a 25k RAM buffer and write it all at once in fds, in order to do that you'd have to use a virtual page of at least 28k in size and fds would need two of such pages, one for data and one to use as swap.

    I would stick to fstorage for this, it has a simple API and is much more suited for your requirements. There is an example in SDK 14.1 under examples/peripheral/flash_fstorage.

    Regards, emdi

Children
No Data
Related