If you try to write a program on a board with nRF5340 installed, an error will occur.
I can write to other boards using the same J-Link, so I don't think it's a J-Link problem.
When writing with VSCODE, the following error is displayed.
-- west flash: using runner nrfjprog
-- runners.nrfjprog: Flashing file: c:\Users\TSP_M1\nrf5340_audio_demo6\build\zephyr\zephyr.hex
[error] [Client] - Encountered error -12: Command select_coprocessor executed for 30 milliseconds with result -12
ERROR: Failed when selecting coprocessor APPLICATION
[error] [Worker] - Low voltage 0 detected in target device.
ERROR: Low voltage detected at the target. Please make sure the device is
ERROR: properly supplied.
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 43: nrfjprog --program 'c:\Users\TSP_M1\nrf5340_audio_demo6\build\zephyr\zephyr.hex' --sectorerase --verify -f NRF53 --coprocessor CP_APPLICATION --snr 821007475
Add --log and attach the generated log.log file.
Please tell me the cause of the error.
[2024-May-13 19:21:25] [debug] -------------------------------------------------------------------------------- [2024-May-13 19:21:25] [debug] nrfjprog --program C:\Users\TSP_M1\nrf5340_audio_demo6\build\dev_gateway\build_release\zephyr\net_core_app_signed.hex -f NRF53 -q --snr 821007475 --sectorerase --coprocessor CP_NETWORK --log [2024-May-13 19:21:25] [debug] nrfjprog version 10.24.0 external [2024-May-13 19:21:25] [debug] -------------------------------------------------------------------------------- [2024-May-13 19:21:25] [ info] Load library at C:\Program Files\Nordic Semiconductor\nrf-command-line-tools\bin\nrfjprog.dll. [2024-May-13 19:21:25] [ info] Library loaded, loading member functions. [2024-May-13 19:21:25] [ info] Member functions succesfully loaded. [2024-May-13 19:21:25] [debug] [ Client] - open [2024-May-13 19:21:25] [debug] [ Client] - start [2024-May-13 19:21:25] [ info] [ Client] - stdout: Jlinkarm nRF Worker ready. Handling sequence 146b4c1f-65a5-4c9f-a7ab-348e30d1312e. [2024-May-13 19:21:26] [trace] [ Client] - Command open executed for 71 milliseconds with result 0 [2024-May-13 19:21:26] [debug] [ Client] - config [2024-May-13 19:21:26] [debug] [SeggerBackend] - Logger sink registered in Segger backend logger [2024-May-13 19:21:26] [debug] [ JLink] - Logger sink registered in JLink logger [2024-May-13 19:21:26] [debug] [ nRF53] - open [2024-May-13 19:21:26] [debug] [ nRF53] - just_check_family [2024-May-13 19:21:26] [debug] [SeggerBackend] - open_dll [2024-May-13 19:21:26] [debug] [SeggerBackend] - No J-Link DLL path was provided. Attempting to auto detect. [2024-May-13 19:21:26] [ info] [SeggerBackend] - Load library at C:\Program Files\SEGGER\JLink_V794e\JLink_x64.dll. [2024-May-13 19:21:26] [ info] [SeggerBackend] - Library loaded, loading member functions. [2024-May-13 19:21:26] [ info] [SeggerBackend] - Member functions succesfully loaded. [2024-May-13 19:21:26] [debug] [SeggerBackend] - Set batch mode [2024-May-13 19:21:26] [debug] [SeggerBackend] - dll_version [2024-May-13 19:21:26] [ info] [SeggerBackend] - Segger dll version 7.94.e loaded. [2024-May-13 19:21:26] [trace] [ Worker] - Command open executed for 7 milliseconds with result 0 [2024-May-13 19:21:26] [debug] [ nRF53] - config [2024-May-13 19:21:26] [debug] [SeggerBackend] - enum_emu_snr [2024-May-13 19:21:26] [trace] [ Worker] - Command config executed for 2 milliseconds with result 0 [2024-May-13 19:21:26] [trace] [ Client] - Command config executed for 15 milliseconds with result 0 [2024-May-13 19:21:26] [debug] [ Client] - enum_emu_snr [2024-May-13 19:21:26] [debug] [ nRF53] - enum_emu_con_info [2024-May-13 19:21:26] [trace] [ Client] - Command enum_emu_con_info executed for 15 milliseconds with result 0 [2024-May-13 19:21:26] [debug] [SeggerBackend] - is_connected_to_emu [2024-May-13 19:21:26] [debug] [SeggerBackend] - enum_emu_con_info [2024-May-13 19:21:26] [debug] [SeggerBackend] - is_connected_to_emu [2024-May-13 19:21:26] [trace] [ Worker] - Command enum_emu_con_info executed for 3 milliseconds with result 0 [2024-May-13 19:21:26] [debug] [ Client] - connect_to_emu_with_snr [2024-May-13 19:21:26] [debug] [ nRF53] - connect_to_emu_with_snr [2024-May-13 19:21:26] [debug] [SeggerBackend] - is_connected_to_emu [2024-May-13 19:21:26] [debug] [SeggerBackend] - connect_to_emu_with_snr [2024-May-13 19:21:26] [debug] [SeggerBackend] - is_connected_to_emu [2024-May-13 19:21:26] [debug] [SeggerBackend] - ---just_enum_emu_snr [2024-May-13 19:21:26] [debug] [SeggerBackend] - ---just_get_num_emus [2024-May-13 19:21:26] [debug] [SeggerBackend] - ---just_connect_to_emu_with_snr [2024-May-13 19:21:26] [debug] [SeggerBackend] - ---just_connect_to_emu_without_snr [2024-May-13 19:21:26] [debug] [SeggerBackend] - Segger logging enabled. [2024-May-13 19:21:26] [trace] [ JLink] - Firmware: J-Link V11 compiled Dec 4 2023 10:22:45 [2024-May-13 19:21:26] [trace] [ JLink] - Firmware: J-Link V11 compiled Dec 4 2023 10:22:45 [2024-May-13 19:21:26] [trace] [ JLink] - Hardware: V11.00 [2024-May-13 19:21:26] [trace] [ JLink] - S/N: 821007475 [2024-May-13 19:21:26] [trace] [ JLink] - OEM: SEGGER [2024-May-13 19:21:26] [trace] [ JLink] - Feature(s): GDB [2024-May-13 19:21:26] [trace] [ JLink] - Bootloader: 2019 Jul 04 [2024-May-13 19:21:26] [trace] [ JLink] - USB speed mode: High speed (480 MBit/s) [2024-May-13 19:21:26] [trace] [ JLink] - TELNET listener socket opened on port 19021 [2024-May-13 19:21:26] [trace] [ JLink] - WEBSRV WEBSRV_Init(): Starting webserver thread(s) [2024-May-13 19:21:26] [trace] [ JLink] - WEBSRV Webserver running on local port 19080 [2024-May-13 19:21:26] [trace] [ JLink] - Looking for J-Link GUI Server exe at: C:\Program Files\SEGGER\JLink_V794e\JLinkGUIServer.exe [2024-May-13 19:21:26] [trace] [ JLink] - Forking J-Link GUI Server: C:\Program Files\SEGGER\JLink_V794e\JLinkGUIServer.exe [2024-May-13 19:21:26] [trace] [ JLink] - J-Link GUI Server info: "J-Link GUI server V7.94e " [2024-May-13 19:21:26] [trace] [ Client] - Command connect_to_emu_with_snr executed for 110 milliseconds with result 0 [2024-May-13 19:21:26] [trace] [ JLink] - - 79.769ms returns "O.K." [2024-May-13 19:21:26] [debug] [ Client] - read_connected_emu_snr [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_HasError() [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_Lock() [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_ExecCommand("SetRestartOnClose = 0", ...). [2024-May-13 19:21:26] [trace] [ JLink] - - 0.001ms returns 0x01 [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_HasError() [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_ExecCommand("DisableFlashDL", ...). [2024-May-13 19:21:26] [trace] [ JLink] - - 0.000ms returns 0x00 [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_HasError() [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...). [2024-May-13 19:21:26] [trace] [ JLink] - - 0.003ms returns 0x00 [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_HasError() [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_SetHookUnsecureDialog [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_SetHookUnsecureDialog(...) [2024-May-13 19:21:26] [trace] [ JLink] - - 0.011ms returns 0 [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_HasError() [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_TIF_Select(JLINKARM_TIF_SWD) [2024-May-13 19:21:26] [trace] [ JLink] - - 3.088ms returns 0x00 [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_HasError() [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_GetSpeedInfo() [2024-May-13 19:21:26] [trace] [ JLink] - 180000000 Hz / n, n >= 12 [2024-May-13 19:21:26] [trace] [ JLink] - - 0.011ms [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_HasError() [2024-May-13 19:21:26] [debug] [SeggerBackend] - Connected emulator supports SWD speeds up to 15000kHz [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_SetSpeed(2000) [2024-May-13 19:21:26] [trace] [ JLink] - - 0.924ms [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_HasError() [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_GetSpeed() [2024-May-13 19:21:26] [trace] [ JLink] - - 0.003ms returns 2000 [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_HasError() [2024-May-13 19:21:26] [debug] [SeggerBackend] - SWD clock set to 2000kHz [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_GetSN() [2024-May-13 19:21:26] [trace] [ JLink] - - 0.004ms returns 821007475 [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_HasError() [2024-May-13 19:21:26] [trace] [ JLink] - - 0.004ms [2024-May-13 19:21:26] [debug] [ nRF53] - read_device_family [2024-May-13 19:21:26] [trace] [ Worker] - Command connect_to_emu_with_snr executed for 105 milliseconds with result 0 [2024-May-13 19:21:26] [debug] [ nRF53] - read_connected_emu_snr [2024-May-13 19:21:26] [trace] [ Client] - Command read_connected_emu_snr executed for 15 milliseconds with result 0 [2024-May-13 19:21:26] [debug] [SeggerBackend] - is_connected_to_emu [2024-May-13 19:21:26] [debug] [ Client] - enable_coprocessor [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_IsOpen() [2024-May-13 19:21:26] [trace] [ JLink] - - 0.011ms returns 0x01 [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_HasError() [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_Lock() [2024-May-13 19:21:26] [debug] [SeggerBackend] - read_connected_emu_snr [2024-May-13 19:21:26] [trace] [ JLink] - - 0.004ms [2024-May-13 19:21:26] [trace] [ Worker] - Command read_connected_emu_snr executed for 0 milliseconds with result 0 [2024-May-13 19:21:26] [debug] [ nRF53] - enable_coprocessor [2024-May-13 19:21:26] [debug] [SeggerBackend] - is_connected_to_emu [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_IsOpen() [2024-May-13 19:21:26] [trace] [ JLink] - - 0.012ms returns 0x01 [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_HasError() [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_Lock() [2024-May-13 19:21:26] [debug] [ nRF53] - Just_enable_coprocessor [2024-May-13 19:21:26] [debug] [SeggerBackend] - is_secure_debug_available [2024-May-13 19:21:26] [debug] [SeggerBackend] - read_access_port_register [2024-May-13 19:21:26] [debug] [SeggerBackend] - ---just_read_access_port_register [2024-May-13 19:21:26] [debug] [SeggerBackend] - coresight_configure [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_GetHWStatus(...) [2024-May-13 19:21:26] [trace] [ JLink] - - 0.631ms returns 0 [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_HasError() [2024-May-13 19:21:26] [trace] [ JLink] - - 0.003ms [2024-May-13 19:21:26] [trace] [ JLink] - JLINK_Close() [2024-May-13 19:21:26] [debug] [SeggerBackend] - is_connected_to_emu [2024-May-13 19:21:26] [warning] [ nRF53] - Ignore error while fetching secure transfer state. -12: Low voltage 0 detected in target device. [2024-May-13 19:21:26] [debug] [ nRF53] - Just_readback_status [2024-May-13 19:21:26] [debug] [SeggerBackend] - read_access_port_register [2024-May-13 19:21:26] [debug] [SeggerBackend] - is_connected_to_emu [2024-May-13 19:21:26] [debug] [SeggerBackend] - is_connected_to_emu [2024-May-13 19:21:26] [debug] [SeggerBackend] - is_connected_to_emu [2024-May-13 19:21:26] [debug] [SeggerBackend] - is_connected_to_emu [2024-May-13 19:21:26] [error] [ Worker] - Cannot call read_access_port_register when connect_to_emu_without_snr or connect_to_emu_with_snr has not been called. [2024-May-13 19:21:26] [trace] [ Worker] - Command enable_coprocessor executed for 14 milliseconds with result -2 [2024-May-13 19:21:26] [error] [ Client] - Encountered error -2: Command enable_coprocessor executed for 31 milliseconds with result -2 [2024-May-13 19:21:26] [debug] [ nRF53] - close [2024-May-13 19:21:26] [debug] [SeggerBackend] - is_connected_to_emu [2024-May-13 19:21:26] [debug] [SeggerBackend] - close [2024-May-13 19:21:26] [debug] [SeggerBackend] - disconnect_from_emu [2024-May-13 19:21:26] [debug] [SeggerBackend] - is_connected_to_emu [2024-May-13 19:21:26] [debug] [SeggerBackend] - Segger Backend closed. [2024-May-13 19:21:26] [debug] [ nRF53] - nRF family DLL closed [2024-May-13 19:21:26] [trace] [ Worker] - Command close executed for 28 milliseconds with result 0 [2024-May-13 19:21:26] [trace] [ Client] - Command close executed for 45 milliseconds with result 0 [2024-May-13 19:21:26] [debug] [ Client] - terminate [2024-May-13 19:21:26] [trace] [ Client] - Command terminate executed for 0 milliseconds with result 0 [2024-May-13 19:21:26] [trace] [ Worker] - Command terminate executed for 0 milliseconds with result 0 [2024-May-13 19:21:26] [trace] [ Worker] - Executed 8 commands for 159 milliseconds [2024-May-13 19:21:26] [debug] [ Client] - Worker process exited with code: 0 [2024-May-13 19:21:26] [debug] [ Client] - Worker process exited with code: 0 [2024-May-13 19:21:26] [debug] [ Client] - Child process terminated with result 0 [2024-May-13 19:21:26] [trace] [ Client] - Executed 8 commands for 302 milliseconds [2024-May-13 19:21:26] [debug] [ Client] - terminate