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

fds_record_find returns files that do not exist

Hi

I'm trying to use fds_record_find() to detect if a record exists in flash storage. After erasing the device (via nrfjprog), flashing the softdevice, flashing the program, and calling fds_file_delete(my_file_id), fds_record_find(my_file_id, my_record_key, &record_desc, &ftok) still returns a record with my_file_id and my_record_key. Am I not actually deleting the flash files, or is fds_record_find() finding records that don't actually exist? I think it's the latter because I can change my_file_id and my_record_key to values that have never been used before, and fds_record_find() still finds a record.

Related question: I know that fds_file_delete() is an asynchronous event. Does it produce an event when it successfully finishes a delete (FDS_EVT_DEL_FILE ?)? If so, where can I receive this event? Perhaps it's possible that fds_record_find() is finding a record before fds_record_delete() deletes it?

thanks

SDK14

Related