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

Problems with flashwriting (ret_code_t=2) (nRF52832_XXAA)

I'm having difficulties writing, retrieving and deleting data from flash, using fds on nRF52832_XXAA. Sometimes the flash writing succeeds, sometimes it fails with with ret_code_t=2. I also do not seem able to delete data, DEADBEEFBADFOOD always at location 0x0007d008, no matter how much i try to delete or garbage collect.

I'm also wondering if there is a way to reliably delete everything from flash, so that I can test and run code within the same data every time.

Any help would be greatly appreciated. :)

Edit: Yes, I forgot to mention that I am currently using an adapted version of the code here for testing: github.com/.../nRF52-fds-example and SDK version 12.1.0, SoftDevice s132.

I have attached some code below: main_snippet.c

Parents
  • I have updated the question to give more info. And yes, fds_record_write() returns error 0x2. Usually the writing never finishes, ie. the write_flag is never set to 1, but it seems I have problems with writing, reading and deletion, so maybe I'm doing something wrong in general. I know that there is a lot of memory available (I looked at the addresses, so that's not the problem either).

Reply
  • I have updated the question to give more info. And yes, fds_record_write() returns error 0x2. Usually the writing never finishes, ie. the write_flag is never set to 1, but it seems I have problems with writing, reading and deletion, so maybe I'm doing something wrong in general. I know that there is a lot of memory available (I looked at the addresses, so that's not the problem either).

Children
No Data
Related