sd_flash_write does not update flash , if already written

Hello Nordic team,

In my application, I was using nrf_nvmc_write_words() to write data to flash. this was working as expected and was able to update value in flash more than once. When I added BLE Softdevice to my application, I replaced this function with sd_flash_write(). After this change, I notice that flash gets written with expected data the first time (i.e flash was previously erased). However, after writing to flash once, if I try to update with another value, I don't see that the value gets updated.

Can you please let me know what could be the issue here? Is there any extra step to be done when using sd_flash_write() to update flash? 

Wishing you Happy Holidays,

Anusha

Parents Reply
  • Hi,

    anusha_14 said:
    Will using fstorage library help?

    No, that will not help. The fstorage library basically provide direct flash access, only that it abstracts away the differences between using a SoftDevice or not. You need a bit more, for instance FDS. There are also other possibilities, but I would suggest using FDS as that is provided for you, it is well tested, and you may even already use it without being aware of it (if you are using the peer manager).

Children
No Data
Related