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

Using wait_for_fds_ready() after each flash write or read?

Okay so I use fds for flash writing and wanted to ask should I use the wait_for_fds_ready() function after each operation and how critical is it?

Parents
  • Hi,

    No need to do so no. The flash operations will be queued and scheduled automatically.

    My only recommendation is that you for instance can use nrf_fstorage_is_busy(NULL) to check for pending flash operations before you go to system OFF and/or do do a soft reset. That way you ensure that all flash operations are completed before you go into a mode where pending flash operations may be "lost".

    Best regards,
    Kenneth

Reply
  • Hi,

    No need to do so no. The flash operations will be queued and scheduled automatically.

    My only recommendation is that you for instance can use nrf_fstorage_is_busy(NULL) to check for pending flash operations before you go to system OFF and/or do do a soft reset. That way you ensure that all flash operations are completed before you go into a mode where pending flash operations may be "lost".

    Best regards,
    Kenneth

Children
Related