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
  • Hi.

    Are you able to program the bootloader using nrfjprog?

    Best regards,

    Andreas

  • OK i downloaded nrfjprog and had a try.

    I am using a MacBook Pro with OSX 10.14.5 Mojave.

    Type in following command gives me really mess error messages:

    =========

    nrfjprog --family nRF52 -e --log

    ERROR: JLinkARM DLL reported an error. Try again. If error condition

    ERROR: persists, run the same command again with argument --log, contact Nordic

    ERROR: Semiconductor and provide the generated log.log file to them.

    ==========

    and i can not find log.log anywhere.

    So what else?

  • No nothing there, and not in anywhere else.

    The same 52840 board of course. 

    I also tested it on 52840DK and the result is the same. So does not look like a hardware issue.

    Now can you confirm that:

    1. is bootloader hex file specical than other hex files?

    2. Do i need to do some special handling before flash it? like sign it, or manually edit something? 

    3. Or is it protected by something?

    Also, can you help to confirm that if you get same issue when programming bootloader through JLink?

    thanks.

  • Hi.

    Which version of J-Link do you have?

    rolandash said:
    1. is bootloader hex file specical than other hex files?

     No, this hex file is not special

    rolandash said:
    2. Do i need to do some special handling before flash it? like sign it, or manually edit something? 

     No, you don't need to do something special before flashing it.

    rolandash said:
    3. Or is it protected by something?

     No, it is not protected by something.

    rolandash said:
    Also, can you help to confirm that if you get same issue when programming bootloader through JLink?

     I don't get this error:

    Best regards,

    Andreas

  • @AndreasF

    thank you for the confirmation.

    I have been using JLink V6.42e, and since i downloaded nrfjprog yesterday, i also have tried V6.44, they all act the same way.

    So i got the bottom line now. I think i will find a Windows box to give a try first.

  • Hi.

    Thanks for the reply, looking forward to hear what you find out :-)

    Best regards,

    Andreas

  • 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.

Reply
  • 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.

Children
Related