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
  • Yes, I had read through the initialising and had the pm_init in the main function. I solved the issue. The sample code initialised the peer manager and then called a test init later. This means the system initialises the fds module twice and the first time is early during the start up. In my code I had my test method calls right after the initialisation and didn't wait for the event handler to return that it had been initialised. I added a delay flag to wait for the response and now it works. Thanks for the help!

Reply
  • Yes, I had read through the initialising and had the pm_init in the main function. I solved the issue. The sample code initialised the peer manager and then called a test init later. This means the system initialises the fds module twice and the first time is early during the start up. In my code I had my test method calls right after the initialisation and didn't wait for the event handler to return that it had been initialised. I added a delay flag to wait for the response and now it works. Thanks for the help!

Children
No Data
Related