Hello,
Is it possible to erase only first N kB of internal flash memory before reprogramming nRF51 with JLink?
Lets say that I just want to erase first 64 kB of flash, how can I achieve that with Segger and JLinkExe?
Hello,
Is it possible to erase only first N kB of internal flash memory before reprogramming nRF51 with JLink?
Lets say that I just want to erase first 64 kB of flash, how can I achieve that with Segger and JLinkExe?
Hi,
yes, if N kB is divisible by the page size.
Read the NVMC chapter in the reference manual for how to erase single flash pages and the source code of nrfjprog.sh and you should be able to figure this out.
nrfjprog.sh: github.com/.../nrfjprog.sh
You can use nrfjprog and the erasepages command to erase flash pages from a given start address to a given end address. Thus, if you want to erase the first 64kB of flash you use the following command
nrfjprog --erasepages 0x00000-0x10000
-Bjørn