nRF5340-DK - failed to download application

Dear all,

 I'm running into the following issue:

Hardware

nRF5340-DK, 2.0.0, 2021.42

Software

SES for ARM Nordic Edition, V5.68 (64-bit)

nRF-Command-Line-Tools-10.15.4-x64.exe

'empty_app_core' for _cpuapp

'ptx' for _cpunet

 

No changes to the installation or code after installation.

 

 

When trying to load 'empty_app_core' for _cpuapp, the following error will usually occur

 

Preparing target for download

Executing Reset script TargetInterface.resetAndStop()

Reset: ARMv8M core with Security Extension enabled detected.

Reset: Halt core after reset via DEMCR.VC_CORERESET.

Reset: Reset device via AIRCR.SYSRESETREQ.

Downloading ‘zephyr.elf’ to J-Link

Programming 3.8 KB of addresses 00000000 — 00000f37

Programming 0.0 KB of addresses 00000f38 — 00000f9b

Failed to prepare for programming.

Could not preserve target memory.

Failed to download application.

Generic error.

Please check J-Link and target connection.

Download failed.

The same will happen for 'ptx' on _cpunet.

 

Following the advice I found on the board, I was running a recovery on both cores

nrfjprog --recover --coprocessor CP_NETWORK

nrfjprog --recover

 

Which allowed to load 'empty_app_core' - but only once.

 

After loading 'empty_app_core' once, it is also possible to load 'ptx' for _cpunet, once.

Running a recovery again will allow to load again, once.

Any ideas? Slight smile

Thank you!

Parents
  • Hello Ulrich,

    I will have to get back to you next week.

    Though I believe you are running into the readback protection, that is enabling itself again by default after something is flashed to the DK. 

    So having to recover the chip, or erasing all is what is expected. You can continue doing this if you want to, or if you find it cumbersome you can disable it.

    Regards,

    Elfving

  • Hi Elfving,

    thank you! I went for a SES reinstall, and am running into a JSON whatever problem right at start now. Seeing SES is being outphased, I'm trying to transition to VS now; flashing the board is no issue with VS, so that is good.

    However, debugging is not working :/ The joy of unknown IDEs.

    Regards,

    Uli

  • ubat said:

    However, debugging is not working :/ The joy of unknown IDEs.

    Hehe I hear you. It is quite easy to learn though, and great to use when you do. Is nothing happening when you press the Debug option? Are you seeing these icons on top of the VSC window?

    ubat said:
    I went for a SES reinstall, and am running into a JSON whatever problem right at start now. Seeing SES is being outphased, I'm trying to transition to VS now;

    I see. I could probably help you with this json problem as well if you would provide me with a bit more info, though I agree that transitioning to VS is a good choice as well.

    Regards,

    Elfving

Reply
  • ubat said:

    However, debugging is not working :/ The joy of unknown IDEs.

    Hehe I hear you. It is quite easy to learn though, and great to use when you do. Is nothing happening when you press the Debug option? Are you seeing these icons on top of the VSC window?

    ubat said:
    I went for a SES reinstall, and am running into a JSON whatever problem right at start now. Seeing SES is being outphased, I'm trying to transition to VS now;

    I see. I could probably help you with this json problem as well if you would provide me with a bit more info, though I agree that transitioning to VS is a good choice as well.

    Regards,

    Elfving

Children
Related