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

How to use "Flash Storage" in example "ble_app_hrs_rscs_relay". (nRF52/SDK11)

Yo men, I study this web infocenter.nordicsemi.com/index.jsp

Experimental: Flash Storage I have 100 bytes data need to read/write/store. So I think even this is Experimental still enough for me. and I want to ask when I use "ble_app_hrs_rscs_relay" example. How can I add fs funs for my data. and how can I know which flash page I can use.

Parents
  • Hi,

    If you use Flash Data Storage you do not need to think about what flash pages are actually used, as this is abstracted away. Rather you should read up on the concepts used in Flash Data Storage (i.e. the Functionality) and follow the descriptions of the Usage section of the documentation.

    The ble_app_hrs_rcs_relay example that you mention already uses FDS through Peer Manager, and the initialisation of FDS is done as part of the Peer Manager initialisation (pm_init()). You must still register an event handler for you usage of the FDS module (using fds_register()). However there is a bug in the current implementation of Peer Manager, where the FDS event handler for Peer Manager erronously consumes events for other FDS entries. See this other DevZone question for details. It will be fixed in the next SDK release.

    An alternative to using Flash Data Storage is Flash Storage, which is the abstraction which FDS is built on top of. This is more similar to the Persistent Storage Manager (pstorage) known from previous SDK versions. It too requires that you register the usage, and it also abstracts away what flash pages are used for storage.

    Regards, Terje

  • I got it and I try this today. Thanks a lot.

Reply Children
No Data
Related