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

storing data to flash by using mesh

Hellou, I am developing application which need data array store to flash manager. I used for some function for storing data (nrf_fstorage_init(), nrf_fstorage_erase(), nrf_fstorage_write(), nrf_fstorage_read). I am implement this functions from SDK example to mesh examle LIGHT_SWITCH, but i have problem by write data to flash. When I write data to flash and after i read data from flash it work, when this is before inicialization the MESH NETWORK, data write and read before - nrf_mesh_node_config(). But when I inicializate first MESH network by function nrf_mesh_node_config(), and after I need write data array to specific address and after I read this data , data was not stored to flash. What is difference between storing data before inicialization MESH network , when data was stored and storing data to flash AFTER inicialization MESH network, when this data is not stored. 

Have you any example how store data array to specific address after inicialization MESH NETWORK? 

Thank you for answer. 

Parents
  • Hi Vojtech

    I would recommend reading through the Coexistence with nRF5 SDK BLE functionality chapter on the info center, in particular the segment called nRF5 SDK NVM storage modules

    As mentioned there you should use the flash manager module provided in the mesh SDK to handle flash access, since the fstorage module doesn't work well when the mesh SDK is constantly requesting timeslots. 

    Alternatively you could disable the mesh stack each time you need to access flash, and enable it afterwards, but this works best if you don't need to write to flash very often. 

    Best regards
    Torbjørn

Reply
  • Hi Vojtech

    I would recommend reading through the Coexistence with nRF5 SDK BLE functionality chapter on the info center, in particular the segment called nRF5 SDK NVM storage modules

    As mentioned there you should use the flash manager module provided in the mesh SDK to handle flash access, since the fstorage module doesn't work well when the mesh SDK is constantly requesting timeslots. 

    Alternatively you could disable the mesh stack each time you need to access flash, and enable it afterwards, but this works best if you don't need to write to flash very often. 

    Best regards
    Torbjørn

Children
Related