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

FDS overwrites and jumbles data after 6000 records

Hello,

I am using sdk12.2.2 and customised nrf52 board. I am writing 6000 records of 24 bytes each in flash of nrf52. My challenge is after 6027 records I am getting error code as FDS_NO_SPACE_FLASH and I am calling fds_gc to delete few records so that I can use this space to write new records but my challenge is that when I am deleting this records after that the new records are randomly written at addresses that were used before and were not deleted. This conflicts and due to this fds jumbles up.

I am attaching my main file and fds logs with this.

Thanks,

main(57).c

6250.log

Parents
  •  So you're writing records to flash until you run out of space, you then run fds_gc to clear records that have been marked for deletion. However, after the garbage collection, the new records overwriting the records that are left the garbage collection that were not marked for deletion. Is that correct? 

    I am not quite sure what I am looking at in the log file. Could it be possible that you're marking wrong records for deletion?

    Do you have any code that will run on a nRF52832 DK?

Reply
  •  So you're writing records to flash until you run out of space, you then run fds_gc to clear records that have been marked for deletion. However, after the garbage collection, the new records overwriting the records that are left the garbage collection that were not marked for deletion. Is that correct? 

    I am not quite sure what I am looking at in the log file. Could it be possible that you're marking wrong records for deletion?

    Do you have any code that will run on a nRF52832 DK?

Children
Related