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

FDS storage with multiprotocol Thread and BLE dynamic switching

Our Project is based on the multiprotocol THREAD BLE dynamic example.

We have the BLE DFU also as part of our project and it is working.

We now need to add the flash storage and want to use the fds module.

THREAD is using 4 pages of flash just below the bootloader to store settings.

How can I control where the fds pages are stored in flash so it does not overwrite the THREAD settings.

Or do I have to move the THREAD settings location?

Thanks

  • Hello Jay,

    Which version of the SDK are you using? The production-ready release of the SDK (nRF5_SDK_for_Thread_and_Zigbee_v1.0.0) added a new item to sdk_config.h to account for that Open Thread flash data section. From the release notes:

    """

    - Introduced a new option FDS_VIRTUAL_PAGES_RESERVED to the FDS module to prevent overwriting of persistent data.

    """

    The FDS_VIRTUAL_PAGES_RESERVED constant is set to 4 in the examples that use Open Thread (e.g. "nRF5_SDK_for_Thread_and_Zigbee_v1.0.0\examples\multiprotocol\ble_thread\ble_thread_dyn_proximity"). This simply tells the FDS to subtract 4 pages from what it considers the end of the flash -- thus leaving them untouched.

    The Peer Manager uses FDS to store bonding information so if you've included it in your project then FDS_VIRTUAL_PAGES is probably set to 3 in sdk_config.h. One virtual page is used by the FDS itself so that leaves 2 pages for use by the Peer Manager. You should increase the FDS_VIRTUAL_PAGES count by a page or two to allow space for your application's data.

  • Thanks 

    This is where we were going but it is nice to get confirmation we are on the crrect path.

Related