nrfutil 7.5.0 doesn't erase target in some cases

Hello People!

I've been using nrfjprog.exe for the past years to erase and program devices, but now I wanted to migrate to the latest nrfutil 7.5.0, as this seems to be the recommended tool now.
Programming, listing, and retrieving device information seems to work nicely, but for a strange reason, I cannot erase my target device (nRF52840) through the J-Link EDU programmer.

The command returns without issues, but the device flash remains intact when compared with nRF Connect for Desktop / Programmer v3.0.8:

C:\Projects\internal-tools\common>nrfutil device erase --traits modem
v Erased 269307115


The 'nrfjprog -f NRF52 -e' command still works like a charm, and interestingly, erasing an nRF52840DK with nrfutil also works, so I suspect there's maybe an issue associated with J-Link EDU Using nrfjprog is an option for us, but I thought this might be a bug in nrfutil which might be useful for other folks too.

I'm attaching the log files from nrfutil with --log-level trace for the successful (nRF52840DK) and the unsuccessful (nRF52840 target through JLink EDU) erase procedures for reference. I'm on Windows 10, and the J-Link EDU has the latest FW.

1780.nrfutil_ok.txt

0284.nrfutil_error.txt

[Edit] This was an nrfutil problem, unrelated to the J-Link EDU (see discussion below).

Parents
  • Hi,

    The link was supposed to be a note to myself on this case, I am sorry about that.
    However, I have gotten my hands on a J-Link EDU now.

    And I tested it with nrfutil 7.5.0.

    First I programmed a blinky sample to my nRF52840DK.

    Then I used "nrfutil device erase --serial-number 518004981"

    And the DK stopped blinking, indicating that the flash was indeed erased.

    Which version of the nRF52840DK do you use?
    I got 1.1.0.

    Regards,
    Sigurd Hellesvik

  • Hi Sigurd, appreciate your help!

    I think I've found something interesting that might help to narrow down the problem.

    First of all, to eliminate any custom PCB or 3rd-party-module related issues, I've used the nRF52840-dongle as my test target device with the J-Link EDU. This is what I've done:

    1. Erased the dongle with Programmer v3.0.8 (from nRF Connect Desktop)
    2. Programmed the dongle (still using Programmer v3.0.8) with 'ble_app_blinky_pca10059_s140.hex' from SDK16.0.0 and verified that the example works correctly
    3. Erased the dongle with nrfutil 7.5.0 (nrfutil device reset --traits jlink)
    4. The erase was successful, the flash was empty (verified with Programmer v3.0.8)

    Then I repeated the exact same steps with the 'sd_s140_bootloader_buttonless_with_setting_page_dfu_secure_ble_debug_with_bonds.hex' example, but this time the erase did not work, the flash remained intact, and the example still worked! The below picture was taken after the nrfutil erase command:

    programmer_flash_map

    ((If somebody is new the the orange error, here's a brief description:  RE: Part of the HEX regions are out of the device memory size...from Programmer v2.2.0))

    [EDIT]: If I flash the mentioned buttonless example to the nRF52840-DK with its onboard programmer, the issue is present there as well, the flash remains intact after the erase command.

    So maybe this is not even a J-Link EDU issue, but something has to do with specific memory content? 

Reply
  • Hi Sigurd, appreciate your help!

    I think I've found something interesting that might help to narrow down the problem.

    First of all, to eliminate any custom PCB or 3rd-party-module related issues, I've used the nRF52840-dongle as my test target device with the J-Link EDU. This is what I've done:

    1. Erased the dongle with Programmer v3.0.8 (from nRF Connect Desktop)
    2. Programmed the dongle (still using Programmer v3.0.8) with 'ble_app_blinky_pca10059_s140.hex' from SDK16.0.0 and verified that the example works correctly
    3. Erased the dongle with nrfutil 7.5.0 (nrfutil device reset --traits jlink)
    4. The erase was successful, the flash was empty (verified with Programmer v3.0.8)

    Then I repeated the exact same steps with the 'sd_s140_bootloader_buttonless_with_setting_page_dfu_secure_ble_debug_with_bonds.hex' example, but this time the erase did not work, the flash remained intact, and the example still worked! The below picture was taken after the nrfutil erase command:

    programmer_flash_map

    ((If somebody is new the the orange error, here's a brief description:  RE: Part of the HEX regions are out of the device memory size...from Programmer v2.2.0))

    [EDIT]: If I flash the mentioned buttonless example to the nRF52840-DK with its onboard programmer, the issue is present there as well, the flash remains intact after the erase command.

    So maybe this is not even a J-Link EDU issue, but something has to do with specific memory content? 

Children
Related