Hello.
I'm using nRF52833, pca10100.
Can I erase only 16 bytes (or more..)?
I read this explaination, and there's an erase page partial register, but I don't know how to use it. Do you have any code or examples to refer to?
Regards,
lyrics
Hello.
I'm using nRF52833, pca10100.
Can I erase only 16 bytes (or more..)?
I read this explaination, and there's an erase page partial register, but I don't know how to use it. Do you have any code or examples to refer to?
Regards,
lyrics
Hi,
Can I erase only 16 bytes (or more..)?
No, an erase will be aligned on a flash page, which is 4k in the nRF52-series devices.
I read this explaination, and there's an erase page partial register, but I don't know how to use it. Do you have any code or examples to refer to?
This is related to chunking up an erase operation into several time slices. A full erase of a page takes 87.5ms for the nRF52833, as shown here: https://infocenter.nordicsemi.com/topic/ps_nrf52833/nvmc.html?cp=4_1_0_3_2_10#unique_1917145559
The problem is that any flash access during this time will halt the CPU until the flash operation is finished. The "partial erase" allows you to do 9 x 10 ms chunks for erasing one page to avoid such a long CPU halt time at once.
Kind regards,
Håkon