PSA: Nrfutil may not recover NRF5340 network core with 3rd party J-Link

This one gets complicated as I cannot reproduce the problem with my original NRF5340 DK.

Steps to reproduce are trivially easy, but only fail when using my favourite OEM J-Link (Silicon Labs PCB4001) that has a display and an ethernet port.

nrfutil device erase --core network
nrfutil device reset

This puts the network core in a state where you need to "recover" it from.

When you now use 

west flash --recover

It will always fail with the OEM J-Link but work with NRF5340 DK hardware - tested with both internal and externally connected MCU.

The interesting part is that

west flash --recover -r nrjfprog

works even with the OEM J-Link hardware and will yield a successful flashing procedure.

Side note: Older SDK/toolchain versions also work when using nrfjprog as the default runner, but newer SDKs use nrfutil by default.

Could just be a "too old firmware" problem, the OEM J-Link says its firmware is from Jan 2018. Workaround with nrfjprog might be useful for people that don't want to upgrade J-Link firmware.

The OEM J-Link has no problems flashing or debugging NRF5340 otherwise.

Parents
  • Hi,

    Thank you for reporting this. I will add it to our internal bug tracker. Since it's working with nrfjprog but not nrfutil device I think it may be worth looking into it.

    Best regards,

    Vidar

    EDIT: forgot to ask if Nrfutil device is up to date. You can run "nrfutil device --version" to check the version number (latest version at time of writing is v2.15.7) and "nrfutil upgrade" to install the latest version.

    EDIT 2: developer requested error information from the "west flash --recover" command:

    "Yeah, would be good to understand why it fails here.

    They didn’t mention how it failed, could you ask them what error message they get in west flash --recover?

    Assuming it’s the recover step that fails (and not the programming step afterwards, or the app core recover later), it would be interesting to see the log in <USERHOME>/.nrfutil/logs/nrfutil-device.log from nrfutil device recover --core Network --log-level trace after they’ve put the network core in the state where it’s protected, and the same for nrfjprog --recover --log <path>."

Reply
  • Hi,

    Thank you for reporting this. I will add it to our internal bug tracker. Since it's working with nrfjprog but not nrfutil device I think it may be worth looking into it.

    Best regards,

    Vidar

    EDIT: forgot to ask if Nrfutil device is up to date. You can run "nrfutil device --version" to check the version number (latest version at time of writing is v2.15.7) and "nrfutil upgrade" to install the latest version.

    EDIT 2: developer requested error information from the "west flash --recover" command:

    "Yeah, would be good to understand why it fails here.

    They didn’t mention how it failed, could you ask them what error message they get in west flash --recover?

    Assuming it’s the recover step that fails (and not the programming step afterwards, or the app core recover later), it would be interesting to see the log in <USERHOME>/.nrfutil/logs/nrfutil-device.log from nrfutil device recover --core Network --log-level trace after they’ve put the network core in the state where it’s protected, and the same for nrfjprog --recover --log <path>."

Children
No Data
Related