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

Wait for fds write to finish SDK14

Hi

I would like to write some data to flash directly before powering off. I have a few questions:

  1. What is the best way to know if my write operation has finished?
  2. If I have make several write operations in a short amount of time, it's likely that some will be queued given that it's an asynchronous operation. Is there a way to check if there are any queued operations left?
  3. Where can I find the fds event handler in SDK14 (provided it still exists)? Or where can I get the events returned by fds

Thanks SDK14 nrf52832

  • Did you try my suggestion per your related question on this found here? devzone.nordicsemi.com/.../

    Anyway

    1. Raise a flag on calling fds_record_write() that is cleared in fds_evt_handler()

    2. If performing several fds_record_write()wait until the flag is cleared in fds_evt_handler() before continuing with the next fds_record_write(). Use this same flag to indicate when all of the fds_record_write()s have occurred.

    3. In the Nordic Information Center enter "Flash Data Storage v14" for usage under SDK14. Gives you information about fds_evt_handler() for SDK 14.

  • Thanks I'll give it a shot--I'll be back once I've tried it.

  • Got it working, thanks! Instead of a flag, I just kept a counter of the number of writes pending. I also checked the file_id within the event structure to see if it was a file controlled by me or the system.

Related