I have several nrf52832 based (similar) devices, all are programmed once (at least), now when i try to update program some of devices cannot be programmed (about 5...10% of them).
Below is j-link messages:
Link connection not established yet but required for command.
Connecting to J-Link via USB...O.K.
Firmware: J-Link V10 compiled Jan 7 2020 16:51:47
Hardware version: V10.10
S/N:xxxxxxxxxx
License(s): FlashBP, GDB
OEM: SEGGER-EDU
VTref=3.322V
Target connection not established yet but required for command.
Device "NRF52832_XXAA" selected.
Connecting to target via SWD
InitTarget() start
InitTarget() end
InitTarget() start
InitTarget() end
InitTarget() start
InitTarget() end
InitTarget() start
InitTarget() end
Cannot connect to target.
When trying to program device using Segger Build and run, I get error box
Failed to connect to target. No idcode detected
I tried to recover device using command: nrfjprog --recover -f nrf52 --log (did not help)
below is log file:
020-Jul-30 11:30:04 --------------------------------------------------------------------------------
2020-Jul-30 11:30:04 nrfjprog --recover -f nrf52 --log
2020-Jul-30 11:30:04 nrfjprog version 10.6.0
2020-Jul-30 11:30:04 --------------------------------------------------------------------------------
2020-Jul-30 11:30:04 nRF_logger_open
2020-Jul-30 11:30:04 nRF_logger_open: nRFJProg logger opened to callback at address 0XFF0610
2020-Jul-30 11:30:04 nRF_open_dll
2020-Jul-30 11:30:04 nRF_open_dll: Load library at "C:\\Program Files (x86)\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\JLINKARM_NRF52_NRFJPROG.dll".
2020-Jul-30 11:30:04 . nRF52_logger_open
2020-Jul-30 11:30:04 . nRF52_logger_open: nRFJProg logger opened to callback at address 0X6C9AB6D0
2020-Jul-30 11:30:04 . nRF52_open_dll
2020-Jul-30 11:30:04 . . Segger_logger_open
2020-Jul-30 11:30:04 . . Segger_logger_open: nRFJProg logger opened to callback at address 0X69AF0300
2020-Jul-30 11:30:04 . . Segger_open_dll
2020-Jul-30 11:30:04 . . Segger_open_dll: Load library at "C:\\Program Files (x86)\\SEGGER\\JLink\\JLinkARM.dll".
2020-Jul-30 11:30:04 . . . Segger_dll_version
2020-Jul-30 11:30:04 . . Segger_set_core_data
2020-Jul-30 11:30:04 nRF_enum_emu_snr
2020-Jul-30 11:30:04 . nRF52_enum_emu_snr
2020-Jul-30 11:30:04 . . Segger_enum_emu_snr
2020-Jul-30 11:30:04 . . . Segger_enum_emu_snr
2020-Jul-30 11:30:04 . . . . Segger_get_num_emus
2020-Jul-30 11:30:04 nRF_connect_to_emu_with_snr
2020-Jul-30 11:30:04 . nRF52_connect_to_emu_with_snr
2020-Jul-30 11:30:04 . . Segger_connect_to_emu_with_snr
2020-Jul-30 11:30:04 . . . Segger_is_connected_to_emu
2020-Jul-30 11:30:04 . . . Segger_enum_emu_snr
2020-Jul-30 11:30:04 . . . . Segger_get_num_emus
2020-Jul-30 11:30:04 . . . Segger_connect_to_emu_with_snr
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: Segger logging enabled with callback at 0x1773078160.
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:024.899
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO Firmware: J-Link V10 compiled Jan 7 2020 16:51:47
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:027.279
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO Decompressing FW timestamp took 307 us
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:031.866
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO Hardware: V10.10
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:033.534
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO S/N: 260112651
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:035.262
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO OEM: SEGGER-EDU
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:039.600
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO Feature(s): FlashBP, GDB
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:043.986
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO TELNET listener socket opened on port 19021
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:045.794
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO WEBSRV Starting webserver
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:047.943
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO WEBSRV Webserver running on local port 19080
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:049.752
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO - 30.437ms returns O.K.
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:051.317
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO JLINK_GetHWStatus(...)
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:053.107
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO - 2.747ms returns 0x00
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:054.780
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO JLINK_ExecCommand("SetRestartOnClose = 0", ...).
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:056.434
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO - 0.656ms returns 0x01
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:057.740
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO JLINK_ExecCommand("DisableFlashDL", ...).
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:059.177
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO - 0.728ms returns 0x00
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:060.591
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:062.043
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO - 0.732ms returns 0x00
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:063.504
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO JLINK_SetHookUnsecureDialog(...)
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:064.946
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO - 2.144ms returns 0
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:066.473
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO JLINK_TIF_Select(JLINKARM_TIF_SWD)
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:069.414
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO - 3.868ms returns 0x00
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:071.162
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO JLINK_SetSpeed(2000)
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO T3644 000:073.605
2020-Jul-30 11:30:04 . . . . Segger_connect_to_emu_without_snr: JLink INFO - 3.218ms
2020-Jul-30 11:30:04 . . . . . Segger_load_core_data
2020-Jul-30 11:30:04 . . . . . Segger_load_core_data: JLink INFO T3644 000:075.753
2020-Jul-30 11:30:04 . . . . . Segger_load_core_data: JLink INFO JLINK_ExecCommand("CORESIGHT_SetIndexAHBAPToUse = 0", ...).
2020-Jul-30 11:30:04 . . . . . Segger_load_core_data: JLink INFO T3644 000:077.201
2020-Jul-30 11:30:04 . . . . . Segger_load_core_data: JLink INFO - 0.704ms returns 0x00
2020-Jul-30 11:30:04 . . . . . Segger_load_core_data: JLink INFO T3644 000:078.653
2020-Jul-30 11:30:04 . . . . . Segger_load_core_data: JLink INFO JLINK_ExecCommand("device = nRF52832_xxAA", ...).
2020-Jul-30 11:30:04 . . . . . Segger_load_core_data: JLink INFO T3644 000:088.041
2020-Jul-30 11:30:04 . . . . . Segger_load_core_data: JLink INFO XML file found at: C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml
2020-Jul-30 11:30:04 . . . . . Segger_load_core_data: JLink INFO T3644 000:090.969
2020-Jul-30 11:30:04 . . . . . Segger_load_core_data: JLink INFO C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml evaluated successfully.
2020-Jul-30 11:30:04 . . . . . Segger_load_core_data: JLink INFO T3644 000:142.333
2020-Jul-30 11:30:04 . . . . . Segger_load_core_data: JLink INFO Device "NRF52832_XXAA" selected.
2020-Jul-30 11:30:04 . . . . . Segger_load_core_data: JLink INFO T3644 000:146.260
2020-Jul-30 11:30:04 . . . . . Segger_load_core_data: JLink INFO - 66.844ms returns 0x00
2020-Jul-30 11:30:04 nRF_recover
2020-Jul-30 11:30:04 . nRF52_recover
2020-Jul-30 11:30:04 . . nRF52_is_ctrl_ap_available
2020-Jul-30 11:30:04 . . . Segger_read_access_port_register
2020-Jul-30 11:30:04 . . . . Segger_is_connected_to_emu
2020-Jul-30 11:30:04 . . . . Segger_is_connected_to_emu: JLink INFO T3644 000:152.988
2020-Jul-30 11:30:04 . . . . Segger_is_connected_to_emu: JLink INFO JLINK_IsOpen()
2020-Jul-30 11:30:04 . . . . Segger_is_connected_to_emu: JLink INFO T3644 000:154.289
2020-Jul-30 11:30:04 . . . . Segger_is_connected_to_emu: JLink INFO - 2.089ms returns 0x01
2020-Jul-30 11:30:04 . . . . Segger_read_access_port_register
2020-Jul-30 11:30:04 . . . . Segger_read_access_port_register: JLink INFO T3644 000:156.741
2020-Jul-30 11:30:04 . . . . Segger_read_access_port_register: JLink INFO JLINK_Lock()
2020-Jul-30 11:30:04 . . . . . Segger_coresight_configure
2020-Jul-30 11:30:04 . . . . . Segger_coresight_configure: JLink INFO T3644 000:158.624
2020-Jul-30 11:30:04 . . . . . Segger_coresight_configure: JLink INFO JLINK_CORESIGHT_Configure()
2020-Jul-30 11:30:04 . . . . . Segger_coresight_configure: JLink INFO T3644 000:260.845
2020-Jul-30 11:30:04 . . . . . Segger_coresight_configure: JLink INFO - 104.283ms returns 0
2020-Jul-30 11:30:04 . . . . . Segger_is_debug_region_powered
2020-Jul-30 11:30:04 . . . . . . Segger_read_debug_port_register
2020-Jul-30 11:30:04 . . . . . . . Segger_write_debug_port_register
2020-Jul-30 11:30:04 . . . . . . . Segger_write_debug_port_register: JLink INFO T3644 000:270.878
2020-Jul-30 11:30:04 . . . . . . . Segger_write_debug_port_register: JLink INFO JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
2020-Jul-30 11:30:04 . . . . . . . Segger_write_debug_port_register: JLink INFO T3644 000:275.836
2020-Jul-30 11:30:04 . . . . . . . Segger_write_debug_port_register: JLink INFO - 7.337ms returns -1
2020-Jul-30 11:30:04 . . . . . . . Segger_write_debug_port_register: JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.
2020-Jul-30 11:30:04 . . . . . . . . Segger_abort_debug_action
2020-Jul-30 11:30:04 . . . . . . . . Segger_abort_debug_action: Attempting to clear any configuration errors in debug port before closing connection.
2020-Jul-30 11:30:04 . . . . . . . . Segger_abort_debug_action: JLink INFO T3644 000:289.263
2020-Jul-30 11:30:04 . . . . . . . . Segger_abort_debug_action: JLink INFO JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)
2020-Jul-30 11:30:04 . . . . . . . . Segger_abort_debug_action: JLink INFO T3644 000:296.099
2020-Jul-30 11:30:04 . . . . . . . . Segger_abort_debug_action: JLink INFO - 9.839ms returns -1
2020-Jul-30 11:30:04 . . . . . . . . Segger_abort_debug_action: JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.
2020-Jul-30 11:30:04 . . . . Segger_read_access_port_register: JLink INFO T3644 000:302.862
2020-Jul-30 11:30:04 . . . . Segger_read_access_port_register: JLink INFO JLINK_Unlock()
2020-Jul-30 11:30:04 nRF_close_dll
2020-Jul-30 11:30:04 . nRF52_close_dll
2020-Jul-30 11:30:04 . . Segger_close
2020-Jul-30 11:30:04 . . . Segger_disconnect_from_emu
2020-Jul-30 11:30:04 . . . . Segger_is_connected_to_emu
2020-Jul-30 11:30:04 . . . . Segger_is_connected_to_emu: JLink INFO T3644 000:310.180
2020-Jul-30 11:30:04 . . . . Segger_is_connected_to_emu: JLink INFO JLINK_IsOpen()
2020-Jul-30 11:30:04 . . . . Segger_is_connected_to_emu: JLink INFO T3644 000:312.189
2020-Jul-30 11:30:04 . . . . Segger_is_connected_to_emu: JLink INFO - 3.052ms returns 0x01
2020-Jul-30 11:30:04 . . . . Segger_disconnect_from_emu
2020-Jul-30 11:30:04 . . . . . Segger_is_connected_to_device
2020-Jul-30 11:30:04 . . . . . Segger_is_connected_to_device: JLink INFO T3644 000:316.439
2020-Jul-30 11:30:04 . . . . . Segger_is_connected_to_device: JLink INFO JLINK_IsConnected()
2020-Jul-30 11:30:04 . . . . . Segger_is_connected_to_device: JLink INFO T3644 000:318.487
2020-Jul-30 11:30:04 . . . . . Segger_is_connected_to_device: JLink INFO - 3.052ms returns FALSE
2020-Jul-30 11:30:04 . . . . . Segger_is_debug_region_powered
2020-Jul-30 11:30:04 . . . . . . Segger_read_debug_port_register
2020-Jul-30 11:30:04 . . . . . . Segger_read_debug_port_register: JLink INFO T3644 000:322.550
2020-Jul-30 11:30:04 . . . . . . Segger_read_debug_port_register: JLink INFO JLINK_Lock()
2020-Jul-30 11:30:04 . . . . . . . Segger_write_debug_port_register
2020-Jul-30 11:30:04 . . . . . . . Segger_write_debug_port_register: JLink INFO T3644 000:325.531
2020-Jul-30 11:30:04 . . . . . . . Segger_write_debug_port_register: JLink INFO JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
2020-Jul-30 11:30:04 . . . . . . . Segger_write_debug_port_register: JLink INFO T3644 000:328.197
2020-Jul-30 11:30:04 . . . . . . . Segger_write_debug_port_register: JLink INFO - 3.718ms returns -1
2020-Jul-30 11:30:04 . . . . . . . Segger_write_debug_port_register: JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.
2020-Jul-30 11:30:04 . . . . . . . . Segger_abort_debug_action
2020-Jul-30 11:30:04 . . . . . . . . Segger_abort_debug_action: Attempting to clear any configuration errors in debug port before closing connection.
2020-Jul-30 11:30:04 . . . . . . . . Segger_abort_debug_action: JLink INFO T3644 000:333.333
2020-Jul-30 11:30:04 . . . . . . . . Segger_abort_debug_action: JLink INFO JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)
2020-Jul-30 11:30:04 . . . . . . . . Segger_abort_debug_action: JLink INFO T3644 000:335.347
2020-Jul-30 11:30:04 . . . . . . . . Segger_abort_debug_action: JLink INFO - 2.773ms returns -1
2020-Jul-30 11:30:04 . . . . . . . . Segger_abort_debug_action: JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.
2020-Jul-30 11:30:04 . . . . . . Segger_read_debug_port_register: JLink INFO T3644 000:337.551
2020-Jul-30 11:30:04 . . . . . . Segger_read_debug_port_register: JLink INFO JLINK_Unlock()
2020-Jul-30 11:30:04 . . . . Segger_disconnect_from_emu: JLink INFO T3644 000:348.138
2020-Jul-30 11:30:04 . . . . Segger_disconnect_from_emu: JLink INFO JLINK_Close()
2020-Jul-30 11:30:04 . . Segger_close: Freeing Library.
2020-Jul-30 11:30:04 nRF_close_dll: Freeing Library.