I'm trying to upload hex files to my NRF52832 with nrfjprog in command line and got the following error:
C:\>nrfjprog --family NRF52 --program C:\NRF_Semi\nRF5_SDK_17.0.2_d674dde\components\softdevice\s132\hex\s132_nrf52_7.2.0_softdevice.hex --chiperase --verify --log ERROR: JLinkARM DLL reported an error. Try again. If error condition ERROR: persists, run the same command again with argument --log, contact Nordic ERROR: Semiconductor and provide the generated log.log file to them.
My log file:
[2021-Jun-18 12:40:11] [ info] -------------------------------------------------------------------------------- [2021-Jun-18 12:40:11] [ info] nrfjprog --family NRF52 --program C:\NRF_Semi\nRF5_SDK_17.0.2_d674dde\components\softdevice\s132\hex\s132_nrf52_7.2.0_softdevice.hex --chiperase --verify --log [2021-Jun-18 12:40:11] [ info] nrfjprog version 10.12.2 [2021-Jun-18 12:40:11] [ info] -------------------------------------------------------------------------------- [2021-Jun-18 12:40:11] [debug] [ nRF0x0] - open_dll [2021-Jun-18 12:40:11] [ info] [ nRF0x0] - Load library at C:\Program Files (x86)\Nordic Semiconductor\nrf-command-line-tools\bin\JLINKARM_NRF52_NRFJPROG.dll. [2021-Jun-18 12:40:11] [ info] [ nRF0x0] - Library loaded, loading member functions. [2021-Jun-18 12:40:11] [ info] [ nRF0x0] - Member functions succesfully loaded. [2021-Jun-18 12:40:11] [ info] [Backend] - Logger callback at 0xcb2020 registered in Segger backend logger. [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] Logger callback at 0xcb2020 registered in JLink logger. [2021-Jun-18 12:40:11] [debug] [nRF520x0] - open [2021-Jun-18 12:40:11] [debug] [Backend] - open_dll [2021-Jun-18 12:40:11] [ info] [Backend] - No J-Link DLL path was provided. Attempting to auto detect. [2021-Jun-18 12:40:11] [ info] [Backend] - Load library at C:\Program Files (x86)\SEGGER\JLink\JLinkARM.dll. [2021-Jun-18 12:40:11] [ info] [Backend] - Library loaded, loading member functions. [2021-Jun-18 12:40:11] [ info] [Backend] - Member functions succesfully loaded. [2021-Jun-18 12:40:11] [debug] [Backend] - dll_version [2021-Jun-18 12:40:11] [ info] [Backend] - Segger dll version 7.22.b loaded. [2021-Jun-18 12:40:11] [debug] [ nRF0x0] - enum_emu_snr [2021-Jun-18 12:40:11] [debug] [nRF520x0] - enum_emu_snr [2021-Jun-18 12:40:11] [debug] [Backend] - is_connected_to_emu [2021-Jun-18 12:40:11] [debug] [Backend] - enum_emu_snr [2021-Jun-18 12:40:11] [debug] [Backend] - ---just_enum_emu_snr [2021-Jun-18 12:40:11] [debug] [Backend] - ---just_get_num_emus [2021-Jun-18 12:40:11] [debug] [Backend] - is_connected_to_emu [2021-Jun-18 12:40:11] [debug] [ nRF0x0] - connect_to_emu_with_snr [2021-Jun-18 12:40:11] [debug] [nRF520x0] - connect_to_emu_with_snr [2021-Jun-18 12:40:11] [debug] [Backend] - is_connected_to_emu [2021-Jun-18 12:40:11] [debug] [Backend] - connect_to_emu_with_snr [2021-Jun-18 12:40:11] [debug] [Backend] - is_connected_to_emu [2021-Jun-18 12:40:11] [debug] [Backend] - ---just_enum_emu_snr [2021-Jun-18 12:40:11] [debug] [Backend] - ---just_get_num_emus [2021-Jun-18 12:40:11] [debug] [Backend] - ---just_connect_to_emu_with_snr [2021-Jun-18 12:40:11] [debug] [Backend] - ---just_connect_to_emu_without_snr [2021-Jun-18 12:40:11] [ info] [Backend] - Segger logging enabled. [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] Firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46 [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] Firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46 [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] Hardware: V8.00 [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] S/N: 4294967295 [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] OEM: SEGGER [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] Feature(s): RDI,FlashDL,FlashBP,JFlash,GDB [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] TELNET listener socket opened on port 19021 [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] WEBSRV Starting webserver [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] WEBSRV Webserver running on local port 19080 [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] - 22.812ms returns "O.K." [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError() [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] JLINK_Lock() [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] JLINK_GetHWStatus(...) [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] - 1.191ms returns 0 [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError() [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand("SetRestartOnClose = 0", ...). [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] - 0.016ms returns 0x01 [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError() [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand("DisableFlashDL", ...). [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] - 0.009ms returns 0x00 [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError() [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...). [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] - 0.008ms returns 0x00 [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError() [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] JLINK_SetHookUnsecureDialog [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] JLINK_SetHookUnsecureDialog(...) [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] - 0.041ms returns 0 [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError() [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] JLINK_TIF_Select(JLINKARM_TIF_SWD) [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] - 3.670ms returns 0x00 [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError() [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] JLINK_SetSpeed(2000) [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] - 0.955ms [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError() [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] JLINK_GetSN() [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] - 0.018ms returns -1 [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError() [2021-Jun-18 12:40:11] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error. [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] - 0.038ms [2021-Jun-18 12:40:11] [ info] [ JLink] - [Info ] [JLink ] JLINK_Close() [2021-Jun-18 12:40:11] [debug] [Backend] - is_connected_to_emu [2021-Jun-18 12:40:11] [debug] [ nRF0x0] - close_dll [2021-Jun-18 12:40:11] [debug] [nRF520x0] - close [2021-Jun-18 12:40:11] [debug] [Backend] - is_connected_to_emu [2021-Jun-18 12:40:11] [debug] [Backend] - close [2021-Jun-18 12:40:11] [debug] [Backend] - disconnect_from_emu [2021-Jun-18 12:40:11] [debug] [Backend] - is_connected_to_emu [2021-Jun-18 12:40:11] [debug] [Backend] - Segger Backend closed. [2021-Jun-18 12:40:11] [debug] [nRF520x0] - nRF family DLL closed [2021-Jun-18 12:40:14] [ info] -------------------------------------------------------------------------------- [2021-Jun-18 12:40:14] [ info] nrfjprog --family NRF52 --program C:\NRF_Semi\nRF5_SDK_17.0.2_d674dde\components\softdevice\s132\hex\s132_nrf52_7.2.0_softdevice.hex --chiperase --verify --log [2021-Jun-18 12:40:14] [ info] nrfjprog version 10.12.2 [2021-Jun-18 12:40:14] [ info] -------------------------------------------------------------------------------- [2021-Jun-18 12:40:14] [debug] [ nRF0x0] - open_dll [2021-Jun-18 12:40:14] [ info] [ nRF0x0] - Load library at C:\Program Files (x86)\Nordic Semiconductor\nrf-command-line-tools\bin\JLINKARM_NRF52_NRFJPROG.dll. [2021-Jun-18 12:40:14] [ info] [ nRF0x0] - Library loaded, loading member functions. [2021-Jun-18 12:40:14] [ info] [ nRF0x0] - Member functions succesfully loaded. [2021-Jun-18 12:40:14] [ info] [Backend] - Logger callback at 0xcb2020 registered in Segger backend logger. [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] Logger callback at 0xcb2020 registered in JLink logger. [2021-Jun-18 12:40:14] [debug] [nRF520x0] - open [2021-Jun-18 12:40:14] [debug] [Backend] - open_dll [2021-Jun-18 12:40:14] [ info] [Backend] - No J-Link DLL path was provided. Attempting to auto detect. [2021-Jun-18 12:40:14] [ info] [Backend] - Load library at C:\Program Files (x86)\SEGGER\JLink\JLinkARM.dll. [2021-Jun-18 12:40:14] [ info] [Backend] - Library loaded, loading member functions. [2021-Jun-18 12:40:14] [ info] [Backend] - Member functions succesfully loaded. [2021-Jun-18 12:40:14] [debug] [Backend] - dll_version [2021-Jun-18 12:40:14] [ info] [Backend] - Segger dll version 7.22.b loaded. [2021-Jun-18 12:40:14] [debug] [ nRF0x0] - enum_emu_snr [2021-Jun-18 12:40:14] [debug] [nRF520x0] - enum_emu_snr [2021-Jun-18 12:40:14] [debug] [Backend] - is_connected_to_emu [2021-Jun-18 12:40:14] [debug] [Backend] - enum_emu_snr [2021-Jun-18 12:40:14] [debug] [Backend] - ---just_enum_emu_snr [2021-Jun-18 12:40:14] [debug] [Backend] - ---just_get_num_emus [2021-Jun-18 12:40:14] [debug] [Backend] - is_connected_to_emu [2021-Jun-18 12:40:14] [debug] [ nRF0x0] - connect_to_emu_with_snr [2021-Jun-18 12:40:14] [debug] [nRF520x0] - connect_to_emu_with_snr [2021-Jun-18 12:40:14] [debug] [Backend] - is_connected_to_emu [2021-Jun-18 12:40:14] [debug] [Backend] - connect_to_emu_with_snr [2021-Jun-18 12:40:14] [debug] [Backend] - is_connected_to_emu [2021-Jun-18 12:40:14] [debug] [Backend] - ---just_enum_emu_snr [2021-Jun-18 12:40:14] [debug] [Backend] - ---just_get_num_emus [2021-Jun-18 12:40:14] [debug] [Backend] - ---just_connect_to_emu_with_snr [2021-Jun-18 12:40:14] [debug] [Backend] - ---just_connect_to_emu_without_snr [2021-Jun-18 12:40:14] [ info] [Backend] - Segger logging enabled. [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] Firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46 [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] Firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46 [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] Hardware: V8.00 [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] S/N: 4294967295 [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] OEM: SEGGER [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] Feature(s): RDI,FlashDL,FlashBP,JFlash,GDB [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] TELNET listener socket opened on port 19021 [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] WEBSRV Starting webserver [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] WEBSRV Webserver running on local port 19080 [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] - 22.773ms returns "O.K." [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError() [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] JLINK_Lock() [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] JLINK_GetHWStatus(...) [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] - 1.286ms returns 0 [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError() [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand("SetRestartOnClose = 0", ...). [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] - 0.016ms returns 0x01 [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError() [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand("DisableFlashDL", ...). [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] - 0.008ms returns 0x00 [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError() [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...). [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] - 0.008ms returns 0x00 [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError() [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] JLINK_SetHookUnsecureDialog [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] JLINK_SetHookUnsecureDialog(...) [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] - 0.041ms returns 0 [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError() [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] JLINK_TIF_Select(JLINKARM_TIF_SWD) [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] - 3.656ms returns 0x00 [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError() [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] JLINK_SetSpeed(2000) [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] - 0.954ms [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError() [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] JLINK_GetSN() [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] - 0.018ms returns -1 [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError() [2021-Jun-18 12:40:14] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error. [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] - 0.039ms [2021-Jun-18 12:40:14] [ info] [ JLink] - [Info ] [JLink ] JLINK_Close() [2021-Jun-18 12:40:14] [debug] [Backend] - is_connected_to_emu [2021-Jun-18 12:40:14] [debug] [ nRF0x0] - close_dll [2021-Jun-18 12:40:14] [debug] [nRF520x0] - close [2021-Jun-18 12:40:14] [debug] [Backend] - is_connected_to_emu [2021-Jun-18 12:40:14] [debug] [Backend] - close [2021-Jun-18 12:40:14] [debug] [Backend] - disconnect_from_emu [2021-Jun-18 12:40:14] [debug] [Backend] - is_connected_to_emu [2021-Jun-18 12:40:14] [debug] [Backend] - Segger Backend closed. [2021-Jun-18 12:40:14] [debug] [nRF520x0] - nRF family DLL closed
I've been searching and searching, but could not solve it. The strange thing is that debugging in Segger Embedded Studio is working fine and also in jlink commander I can connect to the device, so it is probably not a hardware isue...(?)
Jlink commander output: Connecting to target via SWD InitTarget() start InitTarget() end Found SW-DP with ID 0x2BA01477 DPv0 detected Scanning AP map to find all available APs AP[2]: Stopped AP scan as end of AP map has been reached AP[0]: AHB-AP (IDR: 0x24770011) AP[1]: JTAG-AP (IDR: 0x02880000) Iterating through AP map to find AHB-AP to use AP[0]: Core found AP[0]: AHB-AP ROM base: 0xE00FF000 CPUID register: 0x410FC241. Implementer code: 0x41 (ARM) Found Cortex-M4 r0p1, Little endian. FPUnit: 6 code (BP) slots and 2 literal slots CoreSight components: ROMTbl[0] @ E00FF000 ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7 ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM Cortex-M4 identified. J-Link>
Anybody idea's what this could be ?
By the way I'm a newbie to the nrf52 chip
Some other information:
nrfjprog version: 10.12.2
JLinkARM.dll version: 7.22b
I'm working on Windows