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
  • I did not install nrfjprog so I am not sure. I am using JLink all the time, so I have a consistent interface to other chipset as well. 

    Before this issue was found I have been flash hex into 52840 hundreds of times with all goods.

    So what's wrong with JLink command? any special treatment needed to handle a boot loader hex?

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

  • Hi.

    You find the log file in the same path as you run the command from.

    rolandash said:
    Before this issue was found I have been flash hex into 52840 hundreds of times with all goods.

     The same nRF52840, or different?

    Best regards,

    Andreas

  • 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

Related