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

Where is the peer manager data stored?

Hello, I can't find where in flash the peer manager data is stored. I'm currently working on DFU support and as part of that I want to define the memory area that should be preserved when doing updates (I want to store some custom data along with the peer manager stuff).

When looking at the memory map infocenter.nordicsemi.com/.../bootloader_memory_nrf52.svg I suspect that the peer manager data may be part of "Application data", but I can't find information about this anywhere.

Can you either explain this, or point me in the right direction? I'd like to know where peer manager stores its data, and how much data it stores (per connection etc). Also, if it's not in the "Application data" area, how is it handled when doing a DFU?

Thanks, Jacob

Parents
  • Hello Jacob

    The peer manager uses the Flash Data Storage (FDS) module, which in turn uses the Flash Storage (fstorage) module, which again employs the Softdevice,’s API for storing data in flash.

    The FDS registers with fstorage using the highest priority available, meaning its data will be placed at the highest address in flash, underneath the region reserved for the bootloader (if a bootloader is present). By default the FDS reserves 3 pages of flash (defined in sdk_config.h, minimum is 2), where 1 page is used for garbage handling, the rest is used for storage. The location of the stored data within the reserved memory is based on a first come first serve principal, so data location is not sorted based on user. The size of the data from the peer manager varies with what data it needs to store.

    If you use FDS to store your custom data it will be stored in the same reserved flash area where the peer manager data is stored.

    For more information please see the following pages on Nordic Infocenter

    Peer Manager: infocenter.nordicsemi.com/.../lib_peer_manager.html

    Flash Data Storage: infocenter.nordicsemi.com/.../lib_fds.html

    Flash Storage: infocenter.nordicsemi.com/.../lib_fstorage.html

    Best regards

    Jørn Frøysa

  • There is a configuration option in DFU to preserve fds data during updates. I think it's called DFU_APP_DATA_RESERVED in nrf_dfu_types.h. You should set it to the number of pages used by FDS.

Reply Children
No Data
Related