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

sd_flash_page_erase() time execution on nRF52840

Hi!

We develop our product on nRF52840 using S113 softdevice, version 7.0.1. From time to time, we need to erase some part of flash, so we use sd_flash_page_erase() function. We measured time execution of this function and it usually takes about 50 us to be executed.

Also, there is an information in nRF52840 documentation that page erase takes 85 ms maximum.
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Fnvmc.html

Does this function only schedule page erase, which is executed later in smaller parts? Is there any risk, that this function call would take much longer (e.g. 85 ms for whole page erase).

Best regards,
Michal

Parents Reply
  • OK. But my main problem is that after scheduling page erase with SD api, I get very high priority interrupt, which takes up to 90 ms. I try to find a workaround, because it is not acceptable for me to stop my application in random moments for so long. So to sum up:

    - I have softdevice enabled (and I want it to be enabled all the time)

    - I need to erase flash page from time to time

    - I can't let my application to be stopped for tenths of milliseconds

    Is there any workaround for this? Would erasing flash page by chunks in timeslots using NVMC api help?

Children
Related