This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrfjprog and segger IDE won't program nrf91 without full erase first

Lately with 2 different nrf91DK boards I have, I can't program them unless I do a full erase first.

I did see this post here: https://devzone.nordicsemi.com/f/nordic-q-a/50463/flashing-nrf91-through-segger-always-fails-on-first-try  And while I do seem to have a similar problem, it also happens with nrfjprog in the command line as well.  That post talks about it being a segger bug, but is the nrfjprog.exe also a segger tool?  Maybe it is. 

I've got 2 DK's.  0.8.5 and a 0.8.2 with FW 1.0 and 0.7.whatever respectively.  Tested with segger 4.18 and 4.20a and with nrfjprog 10.3, 10.2.1 and an older version I had as well.  Was starting to think my DK's were bad.

If I program with the IDE, it times out during the erase.  If I use nrfjprog it does:

nrfjprog.exe --program C:\svn\SST01\documents\design\SW\Nordic_nRF91_TestFiles\asset_tracker_stock_0_4_0_merged.hex   --sectorerase -r -f nrf91 --verify
Parsing hex file.
Erasing page at address 0x0.
Erasing page at address 0x1000.
......
Erasing page at address 0x32000.
Applying system reset.
Checking that the area to write is not protected.
Programming device.
Verifying programming.
ERROR: Write verify failed.

Is this related to that first link I posted?

If I do a: nrfjprog --eraseall -f nrf91 or IDE: Target -> Connect J-Link, Target -> Erase All

Then it works. 

Parents Reply Children
No Data
Related