This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nrfjprog verify fails with chiperase

Hi,

We've been using nrfjprog with no particular issue for a while now. Usually to fully flash a chip (whether it's for a complete re-flash or for a new chip) we run those 2 steps:

nrfjprog -f nrf52 --eraseall
nrfjprog -f nrf52 --program firmware.hex --sectorerase --reset

I was looking for ways to run with just one command and started to use --chiperase.

However on every other run the command fails with a "Write verify failed". It works on the first time but running it again will trigger the error (and the firmware is not run even after a reset). After getting the error, running the command again works fine (and I can see the chip booting our firmware normally).

And this can be repeated, once it has worked, the next flash will fail, and the one after will succeed, etc.

I don't have this issue using --sectorerase but this doesn't erase the pages we use for fstorage.

Here is nrfjprog output when it fails:

nrfjprog -f nrf52 --program firmware.hex --chiperase --verify --reset --log      
Parsing image file.
Verifying programming.
ERROR: [  nRF52] - Data does not match in address range [0x00001000-0x00018fec] (Flash)
ERROR: [  nRF52] - Expected byte value 0x00 but read 0xff at address 0x000122b8.
ERROR: [  nRF52] - Flash verification failed.
ERROR: [  nRF52] - Failed while verifying file firmware.hex.
ERROR: Write verify failed.

I'm using the latest tools, running on Windows 10.

nrfjprog --version
nrfjprog version: 10.15.2 external
JLinkARM.dll version: 7.58b

Is there anything I should do to avoid getting those verify failures? Thanks!

Related