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

Flashing secure bootloader on the nRF52840 works with SEGGER Embedded but not with nrfjprog

Hi,

I'm trying to flash the secure_bootloader example onto a nrf52840 DK, after generating a private key, flashing with SEGGER embedded studio worked, the device entered DFU mode successfully with LED1/LED2 light up. 

However, when I erase the flash and tried to flash the secure_bootloader hex file using nrfjprog, the process said to have been successful but device does not enter DFU, no LEDs light up.

$ nrfjprog -f nrf52 --program secure_bootloader_usb_mbr_pca10056.hex --sectorerase --verify
Parsing hex file.
Erasing page at address 0x0.
Erasing page at address 0xF4000.
Erasing page at address 0xF5000.
Erasing page at address 0xF6000.
Erasing page at address 0xF7000.
Erasing page at address 0xF8000.
Erasing page at address 0xF9000.
Erasing page at address 0xFA000.
Erasing page at address 0xFB000.
Erasing page at address 0xFC000.
Applying system reset.
Checking that the area to write is not protected.
Programming device.
Verifying programming.
Verified OK.

I also tried with make/make flash, and the same issue is occuring

$ make
mkdir _build
cd _build && mkdir nrf52840_xxaa
Assembling file: gcc_startup_nrf52840.S
Compiling file: nrf_dfu_serial_usb.c
....
....
....
Compiling file: oberon_backend_hmac.c
Linking target: _build/nrf52840_xxaa.out
   text    data     bss     dec     hex filename
  35772     196   24600   60568    ec98 _build/nrf52840_xxaa.out
Preparing: _build/nrf52840_xxaa.hex
Preparing: _build/nrf52840_xxaa.bin
DONE nrf52840_xxaa

$ make flash

DONE nrf52840_xxaa
Flashing: _build/nrf52840_xxaa.hex
nrfjprog -f nrf52 --program _build/nrf52840_xxaa.hex --sectorerase
Parsing hex file.
Erasing page at address 0x0.
Erasing page at address 0xF4000.
Erasing page at address 0xF5000.
Erasing page at address 0xF6000.
Erasing page at address 0xF7000.
Erasing page at address 0xF8000.
Erasing page at address 0xF9000.
Erasing page at address 0xFA000.
Erasing page at address 0xFB000.
Erasing page at address 0xFC000.
Applying system reset.
Checking that the area to write is not protected.
Programming device.
nrfjprog -f nrf52 --reset
Applying system reset.
Run.

Related