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

FLASH storage location when bonding

I have a question about bonding with "Peer Manager".

I am using the sample project "ble_app_multirole_lesc (SDK V15.3.0)".

I am bonding by "Peer Manager".
When bonding, I think that the key is stored in FLASH by "Peer Manager".
Where is the key stored in FLASH?
Also, can I specify the storage location?

Thanking you in advance.

Parents
  • Hi,

    The Peer Manager stores information to a Flash Data Storage (FDS) record, which is stored somewhere in the FDS area of flash. It is not stored to a fixed location, as FDS writes records to unwritten flash in a round-robin fashion. (This is both for providing dynamic flash allocation and for spreading flash wear.)

    What is the purpose of knowing where the key is stored, do you need to retrieve the key for other purposes? I may have other suggestions for how to solve this, if you tell me what you want to do.

    Regards,
    Terje

  • Thank you for answering.

    I use Flash Data Storage (FDS) in my application.
    I delete the page with "sd_flash_page_erase".
    At that time, I am concerned that this operation may erase the key.
    So I want to know where the keys are stored.

    I use only the last page of FLASH in my application.
    Is there a guarantee that the key will not be deleted in "sd_flash_page_erase"?

  • Hi,

    FDS needs at least two pages to function, as there is a swap page in addition to the data pages. Records may be put anywhere inside those pages. Deleting a flash page used for FDS runs the risk of deleting stored records, which may include the record where the key is stored.

    So, if you delete a flash page belonging to FDS, then you may be deleting Peer Manager data, including bonding data.

    If you delete a flash page not belonging to FDS, then Peer Manager data is not affected.

    Regards,
    Terje

Reply
  • Hi,

    FDS needs at least two pages to function, as there is a swap page in addition to the data pages. Records may be put anywhere inside those pages. Deleting a flash page used for FDS runs the risk of deleting stored records, which may include the record where the key is stored.

    So, if you delete a flash page belonging to FDS, then you may be deleting Peer Manager data, including bonding data.

    If you delete a flash page not belonging to FDS, then Peer Manager data is not affected.

    Regards,
    Terje

Children
Related