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

Failure with MESH & BLE coexistence around flash management

I am running into an issue around flash management when attempting mesh coexistance with BLE.

The call I am failing on is during mesh_init().

Line 298 of flash_manager.c

 /* If the page isn't blank, it has to contain valid metadata. If
             * this fails, the selected area contains data not managed by the
             * flash manager. */
            NRF_MESH_ASSERT(metadata_is_valid(&p_manager->config.p_area[i].metadata));

I am using nrf5SDK 17.02 and Mesh SDK 5.00.

I have demonstrated a NUS BLE service alongside a Mesh Sensor Server Model on both the PCA10056 as well as our own custom NRF52840 device. Works great.

Now I am merging that same mesh demo into our main application uses both the peer_manager to allow security as well as the fds.h Flash Data Storage system to store some of our own data to nrf52840 flash very very infrequently.

I have heeded the SDK Coexistance suggestion of adding these lines to my nrf_mesh_config_app.h file.

#include "fds.h"
#include "fds_internal_defs.h"

#define FLASH_MANAGER_RECOVERY_PAGE_OFFSET_PAGES FDS_PHY_PAGES
Any pointers appreciated.
Parents
  • Hi

    Due to the summer vacation period we are currently understaffed, so delayed replies must be expected. I am sorry about any inconvenience this might cause.

    What might be happening here is that the FDS is using the same area of Flash as the flash manager area that the Mesh stack uses? The flash manager from Mesh is usually located at the end of the flash except the bootloader area, defined by the flash recovery page (flash_area_end_get()). Please make sure that the FDS and Mesh flash manager use different areas of the Flash memory.

    Best regards,

    Simon

  • I was able to proceed by what seems like hitting the following define in the makefile:

    CFLAGS += -DCONFIG_APP_IN_CORE

    I had begun trying to check the areas of flash of fds() and peer_managers use of fds(), against the mesh flash management, but then I added this define and things cleared up.

    Not 110% sure on this but it certainly helped.

Reply Children
No Data
Related