This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

data storage with mesh working

  1. As here said link1 If we want to use flash in the mesh we should ignore APP_ERROR_CHECK(NRF_ERROR_INVALID_STATE) in ts_sd_event_handler() ,

2.And here link2 tell us that flash operations take long time, we can complete them througth

(1)call sd_radio_session_close to stop the mesh

(2)wait for the sys event NRF_EVT_RADIO_SESSION_CLOSED

(3)call pstorage_update to store the data

(4)in the pstorage callback handler call timeslot_handler_init to restart the mesh

I follow, besides, add pstorage_sys_event_handler in rbc_mesh_sd_evt_handler.and sd_radio_session_close in mesh_gatt_sd_ble_event_handle ,and ble_data_write on "NRF_EVT_RADIO_SESSION_CLOSED"event

Everytime I write new value to the device,the pstorage_sys_event_handler donot get a sys_evt of"NRF_EVT_FLASH_OPERATION_SUCCESS"or"NRF_EVT_FLASH_OPERATION_ERROR" ,

even thougth the return value of pstorage_store or pstorage_update is "NRF_SUCCESS",

flash_operation_cb donot get "PSTORAGE_LOAD_OP_CODE" or "PSTORAGE_UPDATE_OP_CODE",either.

Someone known where the bug is? Thanks

Parents Reply Children
No Data
Related