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

NRF51 SDK 12 - FDS callback - FDS_EVT_WRITE not triggered

Hi I have tried to make use of the FDS for storing data and encountered this behaviour. The required setup of the sys_evt_dispatch() & fs_sys_event_handler(sys_evt) are done.

The following steps are carried out. fds_register(fds_evt_handler); fds_init(); fds_record_write(&descriptor, &record);

I set the breakpoint in the fds_evt_handler(), only FDS_EVT_INIT can be observed and no FDS_EVT_WRITE which i expect after the fds_record_write()

Is there anything not set up properly. Please advise.

Parents
  • after several trials, i might figured out what caused this issue, when I called fds write in an timer event handler, the FDS_EVT_WRITE never triggered, even though sd_app_evt_wait() was called, while called in the initialization of the timer, the FDS_EVT_WRITE triggered and data got written to flash, that is the fds write or delete should not be called in an event handler or its sub calls, such as a button event handler. question is, the calls always happen in event handler, how can I do it right?

Reply
  • after several trials, i might figured out what caused this issue, when I called fds write in an timer event handler, the FDS_EVT_WRITE never triggered, even though sd_app_evt_wait() was called, while called in the initialization of the timer, the FDS_EVT_WRITE triggered and data got written to flash, that is the fds write or delete should not be called in an event handler or its sub calls, such as a button event handler. question is, the calls always happen in event handler, how can I do it right?

Children
No Data
Related