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

52840 can not program bootloader

Hi,

I know it sounds ridiculers, but i just can not flash bootloader into 52840.

I am under S140 v610, SDK v15.2.

I started using open_bootloader in example (pca10056_usb_debug/armgcc), and compiled OK with armgcc.

Then i use JLink to program the generated .hex file. However, the JLink reported an exception:

J-Link>loadfile /Users/Roland/Workspace/nordic/nRF5_SDK_15.2.0_9412b96/examples/dfu/open_bootloader/pca10056_usb_debug/armgcc/_build/nrf52840_xxaa_debug.hex 
Downloading file [/Users/Roland/Workspace/nordic/nRF5_SDK_15.2.0_9412b96/examples/dfu/open_bootloader/pca10056_usb_debug/armgcc/_build/nrf52840_xxaa_debug.hex]...
Comparing flash   [100%] Done.
Erasing flash     [100%] Done.
Programming flash [100%] Done.
Verifying flash   [100%] Done.
J-Link: Flash download: Bank 0 @ 0x00000000: 1 range affected (4096 bytes)
J-Link: Flash download: Total time needed: 0.046s (Prepare: 0.026s, Compare: 0.001s, Erase: 0.000s, Program: 0.005s, Verify: 0.000s, Restore: 0.012s)
Unspecified error -1

Note the unspecified error at the end. The ld script has start flash address at 0xe0000. I verified the content after writing:

J-Link>mem 0xe0000 40

000E0000 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

000E0010 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

000E0020 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

000E0030 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

Then i tried other pre-compiled bootlader like ".../examples/dfu/secure_dfu_test_images/uart/nrf52840/bootloader_secure_uart_debug_without_bonds_mbr.hex"

 The result is the same.

I am not sure why, as this is just simply .hex file. Other hex files like softedevice and application programs perfect without any issue.

Anything that i could be missing?

Thank you very much.

Parents Reply Children
  • Sry for the late but I am occupied by other projects.

    I came back to close this issue so others can find these information useful.

    52840's bootloader can only successfully be programmed when JLink can identify 52840 out of 52 family. When only pass 'NRF52' as device it just can not succeed. This, however, is not required for other hex files, which suggesting 52840's bootloader does seem bit special. 

    V6.42 I was using is just too old to identify 52840. So I upgraded to 6.44g and at last I can program bootloader now.

    I am still now sure about nrfjprog. When I pass "NRF52" to the command line as in the document it just return errors. Seems the parameters or documents need to be adjusted.

  • I came back to close this issue so others can find these information useful.

    Thanks for doing that. To make it clear that the issue is resolved, you need to verify the answer:

Related