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

Initalizing FDS in mesh sdk

Hello,

I have been recently trying to initialize fds in my application, through the assistance of the given flash_fds examples in the SDK (15.3).

Currently, I'm coming across 2 separate issues, that are stopping me from progressing:

1. I initialize the FDS, it works well, reaches my registered event handler, and seems to be working fine. However, when I reach the function nrf_mesh_init inside mesh_stack_init, I get a mesh assert inside flash_area_valid. Seems like the metadata doesn't align with existing metadata which I assume exists due to fds_init.

2. After moving fds_init to run after the mesh stack init, mesh stack init doesn't fail, but another error occurs.

For some reason, the application won't go through the fds_init function, and will stop as if I hit a breakpoint. The code cursor will point to address A60 with the instruction being ldr r3.

I read somewhere that this is a softdevice assert.

How do I avoid these errors?

Thanks in advance!

Parents Reply Children
  • So I did a little research about the flash manager, and it seems like everything else uses it... I tried it myself but I keep getting stuck on reading due to invalid state, it is saying I am always in FM_STATE_BUILDING. 

    I would be really happy if you could give me some input on the usage of flash manager. The problem for me is that it lacks documentation or examples on how to use it. What do I put in the area field? How do I wait for it to finish the building state? What other things I have to know? It makes it really hard to use the flash manager.

  • Hi.

    Ofek Orgad said:
    it is saying I am always in FM_STATE_BUILDING

     Could you elaborate on what you are doing when this occurs.

    ___________

    The documentation for the flash manager can be found here:
    Flash manager

    We also use the flash manager in our examples in the SDK. You can take a look at the light switch example code on how it's used ther.

    Br,
    Joakim

  • Not doing anything other than adding a manager. I already found the documentation you sent me, it is useless in terms of how to use the configuration of the manager. It does not tell me whatsoever what values I can use for the area, how to make sure they are correct, etc. Basically I'm trying to point to a certain area, I get that the area is invalid inside the flash_manager_add function, and then the manager gets into FM_STATE_BUILDING and stays there, meaning that I cannot read nor write. The example that you pointed to also does not contain useful information, as I try to search for flash_manager_add inside that project, and it only points me towards files of the sdk I have already seen.

Related