I changed the way to get the upgrade program in the bootloader program and wrote a function to write the accepted bin file to the bank0 area.However, I found that it took me about 4~5s to erase the bin file (the file size was about 100KB). Is this speed normal?
Erasing on flash page take up to ~90ms:https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/nvmc.html?cp=4_2_0_10_7#unique_1022076144
So if you for instance are erasing 100kB (e.g. 25 flash pages), then that would alone take about 2.4seconds. In addition you may be writing , validating and/or buffering some data here?
ok,thankyou.Thank you very much for your clarification. So it took me 4~5s to write 96KB as normal time.