I was trying to program my sample to nRF5340's flash using nRF connect v4.0.0 and when i click flash i got this problem:

[error] [ Client] - stderr: [*** LOG ERROR #0001 ***] [2023-03-22 10:37:45] [nRF53] {argument not found}

Failed to enable coprocessor with unknown error.
ERROR: Access to the selected address is blocked by the SPU.
NOTE: For additional output, try running again with logging enabled (--log).
NOTE: Any generated log error messages will be displayed.
FATAL ERROR: command exited with status 37: nrfjprog --recover -f NRF53 --coprocessor CP_NETWORK --snr 1050024693

  • Hi Iben,

    Do you use the 5340DK? Which IDE are you workingon? Is it VSCode?

    Also, please mention the sample that you are trying to flash.

    Best Regards,

    Priyanka

  • Bonjour !

    J'utilise le nRF5340DK et VSCode et je veux programmer le capteur de température DS18B20 et maintenant lorsque je programme un autre capteur j'ai le même problème , même avec l'application "Hello World" . 

  • Hi

    I get exact the same error messages when I try to flash a nRF5340DK with an example of matter SmartPlug or light_switch.

    When compiling for the nRF52840DK the flash programming works fine.

  • Nordic Team,

    I was also able to get an NRF5340DK board in this same state with these exact errors, shortly after upgrading to nrfconnect for vscode extension version: Version 2023.4.148. After debugging for a while, programming failed once and then wouldn't recover.

     No amount of restarts/reboots/reset or 'recover board' worked using the Nordic VSCode add on from with VS Code.

    Release notes had a lot of discussion regarding nrfprog changes, so maybe there is a script issue here.

    For those still having the issue, I was able to bring the board back.

     Using NRF Connect for Desktop 4.0, install the standalone Nordic Programmer app, and do an "Erase" on the device.  This successfully recovered and erased the NRF5340, and then I was able to re-flash and debug etc within VSCode.

  • Hi Joe

    Thanks for the input. It did erase the device but I still get the programming error when trying to flash using vscode:

    "
    * Executing task: nRF Connect: Flash: light_switch2/build (active)

    Flashing build to 1050008458
    C:\WINDOWS\system32\cmd.exe /d /s /c "west flash -d c:\Proj\LiqhtSwitch\light_switch2\build --skip-rebuild --dev-id 1050008458 --erase"

    -- west flash: using runner nrfjprog
    -- runners.nrfjprog: mass erase requested
    -- runners.nrfjprog: Flashing file: C:\Proj\LiqhtSwitch\light_switch2\build\zephyr\merged_domains.hex
    -- runners.nrfjprog: C:\Proj\LiqhtSwitch\light_switch2\build\zephyr\merged_domains.hex targets both nRF53 coprocessors; splitting it into: C:\Proj\LiqhtSwitch\light_switch2\build\zephyr\GENERATED_CP_NETWORK_merged_domains.hex and C:\Proj\LiqhtSwitch\light_switch2\build\zephyr\GENERATED_CP_APPLICATION_merged_domains.hex
    [error] [ Client] - stderr: [*** LOG ERROR #0001 ***] [2023-05-23 13:46:44] [nRF53] {argument not found}

    Failed to enable coprocessor with unknown error.
    ERROR: Access to the selected address is blocked by the SPU.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed.
    FATAL ERROR: command exited with status 37: nrfjprog --program 'C:\Proj\LiqhtSwitch\light_switch2\build\zephyr\GENERATED_CP_NETWORK_merged_domains.hex' --chiperase --verify -f NRF53 --snr 1050008458 --coprocessor CP_NETWORK

    * The terminal process terminated with exit code: 37.
    * Terminal will be reused by tasks, press any key to close it.
    "

    It seems as there is missing an argument:
    [error] [ Client] - stderr: [*** LOG ERROR #0001 ***] [2023-05-23 13:46:44] [nRF53] {argument not found}
    The two hex files are present in the location, so it must be something else.

    Are there some special settings of switches on the nRF5340-DK? I use:
    Power source: VDD
    Flow control: Both ON
    nRF Only: Default

Related