Unable to recover device using nrfutil or nrfjprog but desktop GUI works

I've been using "nrfutil device program" from the command line to flash the nrf5340dk. This has been working fine but recently encountered problems. It will fail to program due to readback protection. Nothing I do resolves this.

Experiment 1:

$ nrfutil device recover && nrfutil device program --traits jlink --firmware build_dk/zephyr/merged_domains.hex
Heavy check mark️ Recovered 1050047412
[00:00:01] ------   0% [1050047412] Failed, [jlink] The operation is unavailable due to readback protection
Error: One or more program tasks failed

The operation was unavailable for some of the devices because they had readback protection enabled. These devices can be unlocked using the `recover` subcommand. See `nrfutil device recover --help` for more information.

Experiment 2:

$ nrfutil device recover --core Application && nrfutil device recover --core Network && nrfutil device program --traits jlink --firm
ware build_dk/zephyr/merged_domains.hex
Heavy check mark️ Recovered 1050047412
Heavy check mark️ Recovered 1050047412
[00:00:01] ------   0% [1050047412] Failed, [jlink] The operation is unavailable due to readback protection
Error: One or more program tasks failed

The operation was unavailable for some of the devices because they had readback protection enabled. These devices can be unlocked using the `recover` subcommand. See `nrfutil device recover --help` for more information.

Experiment 3:

$ nrfutil device recover --core Network && nrfutil device recover --core Application && nrfutil device program --traits jlink --firm
ware build_dk/zephyr/merged_domains.hex
Heavy check mark️ Recovered 1050047412
Heavy check mark️ Recovered 1050047412
[00:00:01] ------   0% [1050047412] Failed, [jlink] The operation is unavailable due to readback protection
Error: One or more program tasks failed

The operation was unavailable for some of the devices because they had readback protection enabled. These devices can be unlocked using the `recover` subcommand. See `nrfutil device recover --help` for more information.

Experiment 4:

$ nrfjprog -f NRF53 -s 1050047412 --recover && nrfutil device program --traits jlink --firmware build_dk/zephyr/merged_domains.hex
Recovering device. This operation might take 30s.
Erasing user code and UICR flash areas.
Writing image to disable ap protect.
[00:00:01] ------   0% [1050047412] Failed, [jlink] The operation is unavailable due to readback protection
Error: One or more program tasks failed

The operation was unavailable for some of the devices because they had readback protection enabled. These devices can be unlocked using the `recover` subcommand. See `nrfutil device recover --help` for more information.

If using the Programmer GUI application that is part of nRF Connect Desktop, everything works fine, but it is not a preferable workflow.

Parents Reply Children
No Data
Related