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

FDS Sample Code

Hi,

I am trying to use the FDS for saving some variables and displaying them again later. I have downloaded the NRF52-fds-master sample code posted on github. However, this uses the peer manager and I don't want to include that in my final code. I copied out all of the methods for init, reading and writing and set the sys_evt_dispatch to use the fs_sys_event_handler. When I compile this code the event handler never triggers on the end of a write operation. I have gone through the code in the SDK documentation but it is all equivalent to the things that I copied from the sample code. I am trying to use UART and the nus ble profile to trigger read and write methods.

Does the FDS only work with the peer manager? Or is there a sample that just uses FDS without the peer manager?

Thanks for the help

Parents
  • Of course FDS works without the peer manager and it works with the softdevice and the uart drivers and everything else, it's simply another wrapper around the flash writing event system, well actually fstorage is another wrapper around the flash writing event system and fds is just built on top of that.

    Basically sounds like you're on the right path, so bang some debugging in there and see what's going on. Is your sys_evt_dispatch() getting called with flash storage events and do the events you're getting make sense, ie is the write actually happening, but you're just not getting the callback? Is the underlying fstorage subsystem getting initialized properly and your client properly registered to it?

    Or post some code, it's impossible to debug observations. You're probably just missing one small thing, the FS and FDS work pretty well, much better than the old pstorage module.

Reply
  • Of course FDS works without the peer manager and it works with the softdevice and the uart drivers and everything else, it's simply another wrapper around the flash writing event system, well actually fstorage is another wrapper around the flash writing event system and fds is just built on top of that.

    Basically sounds like you're on the right path, so bang some debugging in there and see what's going on. Is your sys_evt_dispatch() getting called with flash storage events and do the events you're getting make sense, ie is the write actually happening, but you're just not getting the callback? Is the underlying fstorage subsystem getting initialized properly and your client properly registered to it?

    Or post some code, it's impossible to debug observations. You're probably just missing one small thing, the FS and FDS work pretty well, much better than the old pstorage module.

Children
No Data
Related