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
  • Thanks. After page erase scheduling, the erase is performed from priority 0, as Flash erase/write operations are defined as softdevice timing-critical. So this means that I cannot preempt this process and it takes up to 90 ms. Can anything be done about this? Or do I need to be prepared that after page erase scheduling my code can be completely halted for so long?

Reply
  • Thanks. After page erase scheduling, the erase is performed from priority 0, as Flash erase/write operations are defined as softdevice timing-critical. So this means that I cannot preempt this process and it takes up to 90 ms. Can anything be done about this? Or do I need to be prepared that after page erase scheduling my code can be completely halted for so long?

Children
Related