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

nrf_fstorage_write takes long time to write

Hi,

    I did some benchmark on internal flash access and found it takes more than 2 seconds for the device to write 16kB data. I timed by "nrf_fstorage_is_busy". Is this normal to have such long time to write 16kB(0x4000)? Is there better way to write a big chunk of data at once? 

Thank you,

Min-Ching

Parents
  • Hi,

     

    Continuous 16k write to flash would take approx. 165 ms on nRF52840 (typ. 41 us per word), and up to 1.4 sec on nRF52832 (67.5 us to 338 us per word)

    Are you using the SoftDevice? What would happen then is that the flash operation(s) will be queued in between softdevice events, so the overall time for performing the operation would depend on any other activity.

    If you checkout the two different ways of storing to flash in nrf_fstorage_nvmc.c::write() and nrf_fstorage_sd.c::write(), you can see how the two are handled differently.

     

    Cheers,

    Håkon

  • Hi Håkon,

         I'm using SoftDevice. I don't expect to see a 165ms operation became 2000ms. Did I do something wrong? We do have a HRS code running along with to do the benchmark. Is it possible to tweak this?

    Thank you,

    Min-Ching

Reply Children
Related