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

Failed to download firmware in Segger Embedded Studio

Hi,

I have an error to download firmware in nRF52840-DK, from output console show it failed at verification on address 0x00000000. 

I try to compile the light switch example from "\examples\light_switch\client\" folder into two nRF52840-DK boards but somehow only one board success, Can you help me to figure out what happens?

Thanks 

Output Console

Preparing target for download
Executing script TargetInterface.resetAndStop()
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
Downloading ‘s140_nrf52_6.1.0_softdevice.hex’ to J-Link
Programming 2.5 KB of addresses 00000000 — 00000a17
Programming 147.6 KB of addresses 00001000 — 00025e7b
J-Link: Flash download: Bank 0 @ 0x00000000: 1 range affected (155648 bytes)
J-Link: Flash download: Total time needed: 2.345s (Prepare: 0.048s, Compare: 0.018s, Erase: 0.000s, Program: 2.267s, Verify: 0.003s, Restore: 0.008s)
Verification failed @ address 0x00000000

Parents
  • when I use the nRF Connect v2.6.1  - Programmer app, it will always be hanged when I flash the s140_nrf52_6.1.0_softdevice.hex.

    Is this indicate that the board flash got a problem?

     hanged at "Write prorgess: verify Flash"

  • Can you please try to download the light switch example via Segger Embedded Studios? First erase the board (either via nRF Programmer app) or via nrfjprog. Then, compile the example in SES. Next, press Target -> Connect J-Link. Then, press Target -> Download <project name>, where project name could be ble_app_blinky_pca10040_s132 or light switch_pca10040... for example. Does that work?

  • I use mesh SDK 3.0 and project light_switch_client_nrf52840_xxAA_s140_6_1_0.emProject. 

    and below is the output log

    Preparing target for download
    Executing script TargetInterface.resetAndStop()
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    Downloading ‘s140_nrf52_6.1.0_softdevice.hex’ to J-Link
    Programming 2.5 KB of addresses 00000000 — 00000a17
    Programming 147.6 KB of addresses 00001000 — 00025e7b
    J-Link: Flash download: Bank 0 @ 0x00000000: 1 range affected (155648 bytes)
    J-Link: Flash download: Total time needed: 2.489s (Prepare: 0.118s, Compare: 0.018s, Erase: 0.000s, Program: 2.263s, Verify: 0.002s, Restore: 0.086s)
    Verification failed @ address 0x00000000

    And unable to debug the code due to it failed during flash verification. 

  • I just tested the mesh SDK v3.0 with the light_switch_client_nrf52840_xxAA_s140_6_1_0.emProject & was able to successfully download the code. Which version of SES are you using? I used v3.40. Are you running Windows 10? Could you try to download the mesh sdk v3.0.0 zip again to double check that there is not any issues with linker settings or similar. Or just download the latest mesh sdk & test that instead. 

  • I use Mesh SDK v3.1 and v3.0 + light_switch_client_nrf52840_xxAA_s140_6_1_0.emProject, both also failed to download the firmware and using window 10 + ses v4.12.

    personally, I don't think is software related problem and It looks like the flash problem.

     

  • If this is a hardware failure problem, does the board with any warranty policy? Can i get back a new one nRF52840-DK?

  • Hi Bjorn 

    I just have another round of testing,

    • use Mesh SDK 3.0 +  light_switch_client_nrf52840_xxAA_s140_6_1_0.emProject
    • use ID SES v4.12 to build the project and download two nRF52840-DK and the result show that
      • one nRF52840-DK (1) success download the firmware
      • one nRF52840-DK (2) failed to download the firmware, return flash verification error
    • Verify the hex file with nRF52840-DK (2) flash memory, found the hex value is not exactly the same

    Thus, can you make a comment on this issue? I would like to ask Element14 to return a new nRF52840-DK if you think this is a hardware flash failure. 

    Thanks   

Reply
  • Hi Bjorn 

    I just have another round of testing,

    • use Mesh SDK 3.0 +  light_switch_client_nrf52840_xxAA_s140_6_1_0.emProject
    • use ID SES v4.12 to build the project and download two nRF52840-DK and the result show that
      • one nRF52840-DK (1) success download the firmware
      • one nRF52840-DK (2) failed to download the firmware, return flash verification error
    • Verify the hex file with nRF52840-DK (2) flash memory, found the hex value is not exactly the same

    Thus, can you make a comment on this issue? I would like to ask Element14 to return a new nRF52840-DK if you think this is a hardware flash failure. 

    Thanks   

Children
  • It may be a HW issue, but before we assume that, one more test. Could you please download nrfjprog, then erase the first board via: nrfjprog --eraseall. Then, upload the softdevice via nrfjprog --program path_to_hex_file. The softdevice hex file can be found here: $(SDK_ROOT:../../../../nRF5_SDK_15.2.0_9412b96)/components/softdevice/s132/hex/s132_nrf52_6.1.0_softdevice.hex.

    Lastly, use the same command to program the application, which can be found in the build folder. Then, do nrfjprog -r to do a soft reset of the board.

    Also, could you please try to do nrfjprog -i. You should receive a number back for both boards.

  • Thanks, Bjorn.

    please see the result on below two pictures. 

    1) number for bad Board - 683620689

    2) number for good board - 683607274

  • Interesting. It seems like it worked to program both boards via nrfjprog, which is a good thing. Could you please check to make sure all of the switches on the 52840 DKs are in the same positions when you compare the board that works & the one that does not work?

    Also, have you by any chance cut the solder bridge to measure current via the PPK by any chance?

    Could you please try an nrfjprog --eraseall on both boards & try to program via Segger Embedded Studio one more time. Also check that the usb is plugged in correctly on the DK when programming.

  • 1) The switches in both good and bad board have the same position. 

     2) I do not have Power profile kit in my hand, and if I cut the solder bridge on the board, which meant that need to damage the board. I'm not sure element14 still accept my board or not, can we have another method?  

    3) I tried to erase the board either using nrfjprog or Segger Embedded Studio (connect to Jlink). The result still same as above. 

    4) I use the same USB cable connects to both boards, and make sure the USB fully plugged into computer USB. The result still seeing the bad board return flash problem. 

  • 2) I did not mean that you should cut the solder bridge. I was just wondering if you did or not. If you did, you would have needed to attach a jumper to P22.

    What you can do is try to flash the interface mcu to the nRF52 DK one more time. Turn off the DK & turn it back on while pressing the IF BOOT/RESET button. You should then see the DK appear as a BOOTLOADER drive. Drag & drop the downloaded Interface MCU FW to the malfunctioning DK. Power cycle the board one more time & try to program by via Segger again.

Related