Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

How to configure fstorage and plan for future FDS

I am working with NRF52840 with SoftDevice S140 and SDK v17.1.0.

The boot loader address for this chip is 0xF8000.
I can set up one of the 'fstorage' module with the address range 0xF7000 to 0xF7FFF (1 page) for storing configuration values.

I have plans to add features to the peer manager and for that I will use the FDS back end implementation.
I do not care about the starting address and range used by the FDS but I do want to make sure that the FDS
does not 'overlap' with the address range that I have dedicated to my single FSTORAGE  instance.

I want to plan for this ahead of time by setting up appropriate values in the 'sdk_config.h' files of the application and the boot loader.

What I need to know is HOW to specify the memory arena to be used by the FDS?
Is this a configurable run time parameter to be passed in to the FDS initialization routines?
Or yet another constant value to be defined in the file 'sdk_config.h'?
Or something else?

Cheers

RVM

Parents
  • Hi, 

    The memory arena (i.e., the flash region) used by the Flash Data Storage (FDS) module is set at compile time via the sdk_config.h file. The relevant configs are:

    • FDS_VIRTUAL_PAGES: Number of virtual flash pages to use.
    • FDS_VIRTUAL_PAGE_SIZE: Size of each virtual page (in 4-byte words).
    • FDS_VIRTUAL_PAGES_RESERVED: Number of virtual pages at the end of flash reserved for other modules.

    FDS always allocates its pages at the end of the flash memory, minus any reserved pages. You cannot set the FDS flash region at runtime or via the FDS API; it is only configurable via these macros in  sdk_config.h at compile time. See the Flash data storage module configuration and FDS configuration options.

    Regards,
    Amanda H.

Reply
  • Hi, 

    The memory arena (i.e., the flash region) used by the Flash Data Storage (FDS) module is set at compile time via the sdk_config.h file. The relevant configs are:

    • FDS_VIRTUAL_PAGES: Number of virtual flash pages to use.
    • FDS_VIRTUAL_PAGE_SIZE: Size of each virtual page (in 4-byte words).
    • FDS_VIRTUAL_PAGES_RESERVED: Number of virtual pages at the end of flash reserved for other modules.

    FDS always allocates its pages at the end of the flash memory, minus any reserved pages. You cannot set the FDS flash region at runtime or via the FDS API; it is only configurable via these macros in  sdk_config.h at compile time. See the Flash data storage module configuration and FDS configuration options.

    Regards,
    Amanda H.

Children
No Data
Related