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

Not receiving callback for FDS_EVT_WRITE

I'm attempting to use FDS on the nRF52840DK (PCA10056) with SDK V16.0 and SD enabled.

Per the documentation:

1) I register the callback function: fds_register(fds_evt_handler);

2) Initialize the FDS: rc = fds_init();

3) Wait for fds_action_pending flag to be cleared in the callback

4) Attempt to write a record: rc = fds_record_write(&desc, &write_record);

5) Wait for fds_action_pending flag to be cleared in the callback

While I get the callback for successful initialization and getting NRF_SUCCESS returned from fds_record_write(), the callback is never triggered after the write function.

Any ideas where to look?

Thanks!

Parents
  • Hi,

    A typical reason for such issues is if you are busy waiting (in a loop) for the write to complete form a interrupt priority that is same or higher than that used for the flash operations (SoftDevice in this case). Another possible reason if if the SoftDevice is very busy with BLE links with strict connection parameters, which may make it difficult for it to schedule the flash write. There could be other issues as well.

    If the above does not seem relevant or you do not make progress, then it could be interesting to see your code in ordre to understand the issue better.

Reply
  • Hi,

    A typical reason for such issues is if you are busy waiting (in a loop) for the write to complete form a interrupt priority that is same or higher than that used for the flash operations (SoftDevice in this case). Another possible reason if if the SoftDevice is very busy with BLE links with strict connection parameters, which may make it difficult for it to schedule the flash write. There could be other issues as well.

    If the above does not seem relevant or you do not make progress, then it could be interesting to see your code in ordre to understand the issue better.

Children
Related