In my application, I use the peer manager that has called the fds_init function, should I call it again if I want to use the fds to store my data. Will the peer manager use my area?
In my application, I use the peer manager that has called the fds_init function, should I call it again if I want to use the fds to store my data. Will the peer manager use my area?
Hi,
There is no need to call fds_init() again if you use the peer manager. It will not do any harm as it will not do anything other than generate another FDS_EVT_INIT event immediately to let you know that FDS is initialized. In any case you must remember to not make any other API calls to FDS before you get this event the first time.
The Peer manager use the same flash pages as the application, so you should set FDS_VIRTUAL_PAGES so that there is room for both the peer manager data and your other application data.
Is there any way to separate the area the peer manager used and my data area, does the fstorage can solve this problem, since it will give my the start addr and end addr upon it is initialized.
Is there any way to separate the area the peer manager used and my data area, does the fstorage can solve this problem, since it will give my the start addr and end addr upon it is initialized.
There is no direct way to separate the areas as there is no support for it in FDS, and FDS only support a single instance. You can set a side x number of flash pages and manage it manually via fstorage like you suggest, while keeping FDS for the peer manager only. The downside is that fstorage is only provide basic flash write and erase support, so you will have to provide any file system like features and wear leveling yourself if you need it.