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

nrfjrpog vs JLINK bootloader flash

I am researching OTA procedures and I spent more than a few minutes wrestling with flashing soft devices and bootloader code to the nRF52_DK.

What I found is JLINK seems to work differently than nrfjpog - which interestingly as it uses the Segger libraries.

The difference is nrfjprog works while JLINK sends the MCU into an infinite loop just after a RESET.

I was able to use Ozone with a JLINK programmed device to see the bootloader addresses in the UICR at 10001014 and 10001018, but I saw that during code execution from a RESET the decision to use these values was seemingly skipped.

A key difference in memory between the two programmers is the bootloader memory in the nrfjprog (working) programmed device is not all FF's as it is in the JLINK programmed device.

Is there a means to get a jlink script to be able to accomplish what the nrfjprog utility is able to accomplish?

These are my jlink scripts:

ip jtrace01
si 1
Device NRF52832_XXAB
speed 2000
connect
SWOStat
erase
loadfile /Users/cswanson/nRF52_SDK/components/softdevice/s132/hex/s132_nrf52_2.0.0_softdevice.hex
q

ip jtrace01
si 1
Device NRF52832_XXAB
speed 2000
connect
SWOStat
loadfile /Users/cswanson/nRF52_SDK/examples/dfu/bootloader/hex/dfu_dual_bank_ble_s132_pca10040.hex
r
q

These were my nrfjprog commands:

nrfjprog program --file /Users/cswanson/nRF52_SDK/components/softdevice/s132/hex/s132_nrf52_2.0.0_softdevice.hex  -e -v

nrfjprog program --file /Users/cswanson/nRF52_SDK/examples/dfu/bootloader/hex/dfu_dual_bank_ble_s132_pca10040.hex -v
Related