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

FDS flash writing time

Hello!

I am using nrf52832 with SDK14.0 and SD 5.0.0

I have issue with Flash data storage. I am using code from example (fds_test from github)

          err_code = fds_find_and_delete_my(0x01, 0x01);//ID and key
          APP_ERROR_CHECK(err_code);
          flash_write_flag=0;
          err_code = fds_write_my(0x01, 0x01, RAM_buffer, 4);//id, key, massiv to write, # of bytes
          APP_ERROR_CHECK(err_code);
          //wait until the write is finished. 
          while (flash_write_flag==0);

Writting works good, but it lasts sometimes 300ms, sometimes 3.6s (!!!) (time of waiting flash_write_flag in hundler). 

How can I do it more predictibly?

And one more issue - it's bad to create while() loops in the code - can I replace it with some timer or i can't do anything while writing flash is in the process?

Thank you!

Valdis

Parents Reply Children
No Data
Related