Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using Flash Data Storage Module (FDS) from multiple applications

We're using nRF5 SDK v16.0.0, FreeRTOS, SoftDevice on nRF52832.

We plan on having two applications in flash.  We want both applications to be able to access (read/write) shared data.  My question is, if we initialize FDS module in both applications, will the FDS module automatically load the FDS pages from the same flash area, or will the applications attempt to use different areas?  Is there anything special that needs to be done so that the FDS module will load the files from the same flash pages?

Parents
  • Hi,

    Without modification, FDS would operate on the same flash area from both applications.

    FDS expects the FDS flash pages to be located at the high address end of "Application data" as shown in the bottom figure of the Bootloader Memory layout documentation. In the case of no bootloader, the Application data lies right below the MBR parameter storage (i.e. where the bootloader lies in that figure.) This means if you have two applications, then both will look for the FDS flash pages at the same addresses.

    Please note that for the two applications the number of pages reserved for FDS must be the same, or else one of the applications will see only part of the FDS area. This means not seeing all entries, and the risk of not seeing any swap page (which in turn means FDS fails on initialization). The virtual page size and CRC settings should also be the same. Operation queue, max users and threads only affect the currently running application. See the Configuration section of the FDS documentation for the full list of settings.

    Regards,
    Terje

Reply
  • Hi,

    Without modification, FDS would operate on the same flash area from both applications.

    FDS expects the FDS flash pages to be located at the high address end of "Application data" as shown in the bottom figure of the Bootloader Memory layout documentation. In the case of no bootloader, the Application data lies right below the MBR parameter storage (i.e. where the bootloader lies in that figure.) This means if you have two applications, then both will look for the FDS flash pages at the same addresses.

    Please note that for the two applications the number of pages reserved for FDS must be the same, or else one of the applications will see only part of the FDS area. This means not seeing all entries, and the risk of not seeing any swap page (which in turn means FDS fails on initialization). The virtual page size and CRC settings should also be the same. Operation queue, max users and threads only affect the currently running application. See the Configuration section of the FDS documentation for the full list of settings.

    Regards,
    Terje

Children
No Data
Related