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

FDS & fstorage extra information

Hi,

I'm using sdk14.2 peripheral examples fds and fstorage in an attempt to test flash storage persistance (with softdevice present).

The two examples are quite intuitive and easy to play with thanks to the cli interface (uart).

First i have used fstorage, wrote a long string between 2 pages and read it correctly (below screen capture of my attempt).

image description

Next i have used fstorage and i was surprised to see that the 3 pages I have erased while using fstorage are detected in the fds example. I have modified the print command "static void print_all_cmd " to allow showing the contents of the "freq.p_data" pointer (from clic.c file) and obtained:

image description

I wrote some records with some data strings and checked their presence:

image description

And after I have switched power off/on, data is still present:

image description

It looks that the config record has changed rec id value.

I have studied the post: Flash Data Storage place in memory

... and learnt how the data is organised in the non volatile memory (flash last address 0x80000).

There are some notions that I still don't understand and would like to learn more:

  1. how does FDS module handle "flasharea" command effect (fstorage); how to specify number of pages; are these pages generated automaticaly upon data written; is there a limit, if yes, then how?

  2. using FDS if one record is fully written and data required has no more space left, can it be possible to continue writing to a next record thus insuring contiguous data (like in fstorage) ?

  3. are flash writing events critical while using the softdevice? can this cause system to reset? are there some timings to respect, maximum quantity of data to write during radio operations (advertising/connected state)?

  4. i want to use sdk14.0 (my project is developed upon it); is there any difference between the two sdk versions with respect to FDS or Fstorage modules?

  5. would migrating from 14.0 to 14.2 involve important changes?

Thank you in advance!

Parents
  • Hi,

    1. The number of pages used by FDS is configurable in the application.
    2. FDS will write the record to the available space in the allocated virtual pages. If not enough space is available for the record, a FDS_ERR_NO_SPACE_IN_FLASH error will be returned. You can then run garbage collection, to free space by erasing invalidated records.
    3. FDS is asynchronous and will schedule the flash write/erases between BLE events. Please see the flash memory API description in the Softdevice documentation for details on flash write probability.
    4. See point 5. I think you should be able to use FDS/fstorage from SDK 14.2.0 in SDK 14.0.0, if you do not want to migrate the entire project to SDK 14.2.0.
    5. There is some bugfixes in FDS in SDK 14.1.0 compared to SDK 14.0.0. Please see the release notes.

    I would recommend you to read the FDS and fstorage documentation, if you have not allready done this.

    Best regards,

    Jørgen

Reply
  • Hi,

    1. The number of pages used by FDS is configurable in the application.
    2. FDS will write the record to the available space in the allocated virtual pages. If not enough space is available for the record, a FDS_ERR_NO_SPACE_IN_FLASH error will be returned. You can then run garbage collection, to free space by erasing invalidated records.
    3. FDS is asynchronous and will schedule the flash write/erases between BLE events. Please see the flash memory API description in the Softdevice documentation for details on flash write probability.
    4. See point 5. I think you should be able to use FDS/fstorage from SDK 14.2.0 in SDK 14.0.0, if you do not want to migrate the entire project to SDK 14.2.0.
    5. There is some bugfixes in FDS in SDK 14.1.0 compared to SDK 14.0.0. Please see the release notes.

    I would recommend you to read the FDS and fstorage documentation, if you have not allready done this.

    Best regards,

    Jørgen

Children
No Data
Related