This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

connect failed. Failed to connect to target. No idcode detected.

Hi,

I am facing the issue while trying to run code from SES.
Environment:
PCA10056 board, nRF52840, no change to the board.
Agilent / Keysight DC Power Analyzer N6705B
SES for ARM v4.12
Segger JLink v6.40
S140 SoftDevice s140_nrf52_6.1.0_softdevice / s140_nrf52_6.1.1_softdevice
nRF Connect Android app 4.22.2
nRF Toolbox Android app 2.6.0

I think, these are software updated to the latest.

For the power analysis using DC Power Analyzer, I was using examples from nRF5_SDK_15.2.0_9412b96.
I had copied via windows USB drive JLink, components\softdevice\s140\hex\s140_nrf52_6.1.0_softdevice or DeviceDownload\s140nrf52611\s140_nrf52_6.1.1_softdevice.
It was successful.
Edited the project ble_app_pwr_profiling_pca10056_s140 in ble_peripheral\ble_app_pwr_profiling\ to make the advertising at 1 sec intervals.
I did not cut the SB40, because from DC Power Analyzer N6705B, I had supplied 3.0V only, to the Ext. supply P21.
It worked for a while. I was able to detect and connect from the nRF Connect Android app.
Sometime I changed the SW6 "nRF ONLY / DEFAULT" switch to => "nRF ONLY". And may be switched back to "DEFAULT", not sure.

After some testing and trials and all, now not able to flash from the SES.

Error is:

Connecting ‘J-Link’ using ‘USB’
Connecting to target using SWD
Loaded C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.12/bin/JLink_x64.dll
Firmware Version: J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 12 2018 11:44:41
DLL Version: 6.40`
Hardware Version: V1.00
Target Voltage: 3.300
Device "NRF52840_XXAA" selected.
connect failed
Failed to connect to target.
No idcode detected.
Please check connection and Target Interface Type



Tried using J-Flash, to connect, erase chip... and the error log:

Application log started
 - J-Flash V6.40 (J-Flash compiled Oct 26 2018 15:06:20)
 - JLinkARM.dll V6.40 (DLL compiled Oct 26 2018 15:06:02)
Opening project file [C:\Users\pkrishna\20190110.jflash] ...
 - Project opened successfully
Failed to open data file [C:\Users\pkrishna\]...
Connecting ...
 - Connecting via USB to J-Link device 0
 - J-Link firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 12 2018 11:44:41
 - Device "NRF52840_XXAA" selected.
 - Target interface speed: 200 kHz (Auto)
 - VTarget = 3.300V
 - ERROR: Failed to connect.
Could not establish a connection to target.
J-Link firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 12 2018 11:44:41
Erasing chip ...
 - Connecting ...
    - Device "NRF52840_XXAA" selected.
    - Target interface speed: 200 kHz (Auto)
    - VTarget = 3.300V
    - ERROR: Failed to connect.
Could not establish a connection to target.
 - ERROR: Could not erase chip, not connected
Close project
 - Project closed

And JFlsh-Lite

Connecting to J-Link...
Connecting to target...
ERROR: Could not connect to target.
Done


Also, nrfjprog with options to erase chip,
In that case, it's always same error: JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1. JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.

2019-Jan-09 16:47:49  --------------------------------------------------------------------------------
2019-Jan-09 16:47:49  nrfjprog -e --log
2019-Jan-09 16:47:49  nrfjprog version 9.8.1
2019-Jan-09 16:47:49  --------------------------------------------------------------------------------
2019-Jan-09 16:47:49  nRF_open_dll
2019-Jan-09 16:47:49  . nRFXX_open_dll
2019-Jan-09 16:47:49  . . nRFXX_dll_version
2019-Jan-09 16:47:49  nRF_enum_emu_snr
2019-Jan-09 16:47:49  . nRFXX_enum_emu_snr
2019-Jan-09 16:47:49  nRF_enum_emu_snr
2019-Jan-09 16:47:49  . nRFXX_enum_emu_snr
2019-Jan-09 16:47:49  nRF_connect_to_emu_with_snr
2019-Jan-09 16:47:49  . nRFXX_connect_to_emu_with_snr
2019-Jan-09 16:47:49  . . nRFXX_is_connected_to_emu
2019-Jan-09 16:47:49  . . nRFXX_connect_to_emu_with_snr
2019-Jan-09 16:47:49  . . . nRFXX_connect_to_emu_without_snr
2019-Jan-09 16:47:49  . . . nRFXX_connect_to_emu_without_snr:	JLink:	 Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 12 2018 11:44:41
2019-Jan-09 16:47:49  . . . nRFXX_connect_to_emu_without_snr:	JLink:	 Hardware: V1.00
2019-Jan-09 16:47:49  . . . nRFXX_connect_to_emu_without_snr:	JLink:	 S/N: 683904660
2019-Jan-09 16:47:49  . . . nRFXX_connect_to_emu_without_snr:	JLink:	 TELNET listener socket opened on port 19021
2019-Jan-09 16:47:49  . . . nRFXX_connect_to_emu_without_snr:	JLink:	WEBSRV  Starting webserver
2019-Jan-09 16:47:49  . . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0013ms, 0017ms total)  
2019-Jan-09 16:47:49  . . . nRFXX_connect_to_emu_without_snr:	JLink:	WEBSRV Webserver running on local port 19080
2019-Jan-09 16:47:49  . . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0015ms, 0019ms total)  
2019-Jan-09 16:47:49  . . . nRFXX_connect_to_emu_without_snr:	JLink:	  returns O.K.
2019-Jan-09 16:47:49  . . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0017ms, 0021ms total)  
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_GetHWStatus(...)
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	  returns 0x00
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0002ms, 0023ms total)  
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("Device = Cortex-M4", ...). 
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	XML file found at: C:\Program Files (x86)\SEGGER\JLink_V640\JLinkDevices.xml
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0002ms, 0026ms total)  
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	C:\Program Files (x86)\SEGGER\JLink_V640\JLinkDevices.xml evaluated successfully.
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	Device "CORTEX-M4" selected.
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	Device "CORTEX-M4" selected.
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	  returns 0x00
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0074ms, 0098ms total)  
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("SetRestartOnClose = 0", ...). 
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	  returns 0x01
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0001ms, 0099ms total)  
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("DisableFlashDL", ...). 
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	  returns 0x00
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0001ms, 0101ms total)  
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("SetDbgPowerDownOnClose = 1", ...). 
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	  returns 0x01
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0000ms, 0103ms total)  
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...). 
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	  returns 0x00
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0001ms, 0106ms total)  
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_TIF_Select(JLINKARM_TIF_SWD)
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	  returns 0x00
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0002ms, 0109ms total)  
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_SetSpeed(2000)
2019-Jan-09 16:47:50  . . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0001ms, 0111ms total)  
2019-Jan-09 16:47:50  nRF_read_connected_emu_snr
2019-Jan-09 16:47:50  . nRFXX_read_connected_emu_snr
2019-Jan-09 16:47:50  . . nRFXX_is_connected_to_emu
2019-Jan-09 16:47:50  . . nRFXX_is_connected_to_emu:	JLink:	JLINK_IsOpen()
2019-Jan-09 16:47:50  . . nRFXX_is_connected_to_emu:	JLink:	  returns 0x01
2019-Jan-09 16:47:50  . . nRFXX_is_connected_to_emu:	JLink:	 (0002ms, 0114ms total)  
2019-Jan-09 16:47:50  nRF_read_device_family
2019-Jan-09 16:47:50  . nRFXX_read_device_family
2019-Jan-09 16:47:50  . . nRFXX_is_connected_to_emu
2019-Jan-09 16:47:50  . . nRFXX_is_connected_to_emu:	JLink:	JLINK_IsOpen()
2019-Jan-09 16:47:50  . . nRFXX_is_connected_to_emu:	JLink:	  returns 0x01
2019-Jan-09 16:47:50  . . nRFXX_is_connected_to_emu:	JLink:	 (0002ms, 0116ms total)  
2019-Jan-09 16:47:50  . . nRFXX_read_access_port_register_robust
2019-Jan-09 16:47:50  . . . nRFXX_read_access_port_register
2019-Jan-09 16:47:50  . . . . nRFXX_coresight_configure
2019-Jan-09 16:47:50  . . . . nRFXX_coresight_configure:	JLink:	JLINK_CORESIGHT_Configure()
2019-Jan-09 16:47:50  . . . . nRFXX_coresight_configure:	JLink:	  returns 0
2019-Jan-09 16:47:50  . . . . nRFXX_coresight_configure:	JLink:	 (0105ms, 0222ms total)  
2019-Jan-09 16:47:50  . . . . nRFXX_power_debug_and_system_regions
2019-Jan-09 16:47:50  . . . . . nRFXX_write_debug_port_register
2019-Jan-09 16:47:50  . . . . . nRFXX_write_debug_port_register:	JLink:	JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
2019-Jan-09 16:47:50  . . . . . nRFXX_write_debug_port_register:	JLink:	  returns -1
2019-Jan-09 16:47:50  . . . . . nRFXX_write_debug_port_register:	JLink:	 (0009ms, 0235ms total)  
2019-Jan-09 16:47:50  . . . . . nRFXX_write_debug_port_register:	JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.

2019-Jan-09 16:47:50  . . . . nRFXX_power_debug_and_system_regions:	JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.

2019-Jan-09 16:47:50  . . nRFXX_read_access_port_register_robust
2019-Jan-09 16:47:50  . . . nRFXX_read_access_port_register
2019-Jan-09 16:47:50  . . . . nRFXX_power_debug_and_system_regions
2019-Jan-09 16:47:50  . . . . . nRFXX_write_debug_port_register
2019-Jan-09 16:47:50  . . . . . nRFXX_write_debug_port_register:	JLink:	JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
2019-Jan-09 16:47:50  . . . . . nRFXX_write_debug_port_register:	JLink:	  returns -1
2019-Jan-09 16:47:50  . . . . . nRFXX_write_debug_port_register:	JLink:	 (0009ms, 0248ms total)  
2019-Jan-09 16:47:50  . . . . . nRFXX_write_debug_port_register:	JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.

2019-Jan-09 16:47:50  . . . . nRFXX_power_debug_and_system_regions:	JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.

...
...

{this repeats & continues .. }
...
...
{log ends with ... }


2019-Jan-09 16:47:53  . . nRFXX_read_access_port_register_robust
2019-Jan-09 16:47:53  . . . nRFXX_read_access_port_register
2019-Jan-09 16:47:53  . . . . nRFXX_power_debug_and_system_regions
2019-Jan-09 16:47:53  . . . . . nRFXX_write_debug_port_register
2019-Jan-09 16:47:53  . . . . . nRFXX_write_debug_port_register:	JLink:	JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
2019-Jan-09 16:47:53  . . . . . nRFXX_write_debug_port_register:	JLink:	  returns -1
2019-Jan-09 16:47:53  . . . . . nRFXX_write_debug_port_register:	JLink:	 (0002ms, 1291ms total)  
2019-Jan-09 16:47:53  . . . . . nRFXX_write_debug_port_register:	JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.

2019-Jan-09 16:47:53  . . . . nRFXX_power_debug_and_system_regions:	JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.

2019-Jan-09 16:47:53  . nRFXX_read_device_family:	Discovered device from family NRF52.

2019-Jan-09 16:47:53  nRF_close_dll
2019-Jan-09 16:47:53  . nRFXX_close_dll
2019-Jan-09 16:47:53  . . nRFXX_is_connected_to_emu
2019-Jan-09 16:47:53  . . nRFXX_is_connected_to_emu:	JLink:	JLINK_IsOpen()
2019-Jan-09 16:47:53  . . nRFXX_is_connected_to_emu:	JLink:	  returns 0x01
2019-Jan-09 16:47:53  . . nRFXX_is_connected_to_emu:	JLink:	 (0002ms, 1294ms total)  
2019-Jan-09 16:47:53  . . nRFXX_disconnect_from_emu
2019-Jan-09 16:47:53  . . nRFXX_disconnect_from_emu:	JLink:	JLINK_Close()
2019-Jan-09 16:47:53  nRF_open_dll
2019-Jan-09 16:47:53  . nRF52_open_dll
2019-Jan-09 16:47:53  . . nRF52_dll_version
2019-Jan-09 16:47:53  nRF_connect_to_emu_with_snr
2019-Jan-09 16:47:53  . nRF52_connect_to_emu_with_snr
2019-Jan-09 16:47:53  . . nRF52_is_connected_to_emu
2019-Jan-09 16:47:53  . . nRF52_enum_emu_snr
2019-Jan-09 16:47:53  . . nRF52_connect_to_emu_with_snr
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 12 2018 11:44:41
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 Hardware: V1.00
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 S/N: 683904660
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 TELNET listener socket opened on port 19021
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	WEBSRV  Starting webserver
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0011ms, 0014ms total)  
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	WEBSRV Webserver running on local port 19080
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0013ms, 0016ms total)  
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns O.K.
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0015ms, 0018ms total)  
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_GetHWStatus(...)
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0002ms, 0021ms total)  
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	There is no generic nRF52 device in J-Link, so we select NRF52832_xxAA.

2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("Device = NRF52832_xxAA", ...). 
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	XML file found at: C:\Program Files (x86)\SEGGER\JLink_V640\JLinkDevices.xml
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0001ms, 0024ms total)  
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	C:\Program Files (x86)\SEGGER\JLink_V640\JLinkDevices.xml evaluated successfully.
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	Device "NRF52832_XXAA" selected.
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	Device "NRF52832_XXAA" selected.
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0071ms, 0094ms total)  
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("SetRestartOnClose = 0", ...). 
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x01
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0001ms, 0097ms total)  
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("DisableFlashDL", ...). 
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0001ms, 0100ms total)  
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("SetDbgPowerDownOnClose = 1", ...). 
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x01
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0001ms, 0103ms total)  
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...). 
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0001ms, 0106ms total)  
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_TIF_Select(JLINKARM_TIF_SWD)
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0003ms, 0109ms total)  
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_SetSpeed(2000)
2019-Jan-09 16:47:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0001ms, 0111ms total)  
2019-Jan-09 16:47:53  nRF_read_device_version
2019-Jan-09 16:47:53  . nRF52_read_device_version
2019-Jan-09 16:47:53  . . nRF52_is_connected_to_emu
2019-Jan-09 16:47:53  . . nRF52_is_connected_to_emu:	JLink:	JLINK_IsOpen()
2019-Jan-09 16:47:53  . . nRF52_is_connected_to_emu:	JLink:	  returns 0x01
2019-Jan-09 16:47:53  . . nRF52_is_connected_to_emu:	JLink:	 (0001ms, 0113ms total)  
2019-Jan-09 16:47:53  . . nRF52_is_connected_to_device
2019-Jan-09 16:47:53  . . nRF52_is_connected_to_device:	JLink:	JLINK_IsConnected()
2019-Jan-09 16:47:53  . . nRF52_is_connected_to_device:	JLink:	  returns FALSE
2019-Jan-09 16:47:53  . . nRF52_is_connected_to_device:	JLink:	 (0002ms, 0116ms total)  
2019-Jan-09 16:47:53  . . nRF52_readback_status
2019-Jan-09 16:47:53  . . . nRF52_is_ctrl_ap_available
2019-Jan-09 16:47:53  . . . . nRF52_read_access_port_register
2019-Jan-09 16:47:53  . . . . . nRF52_coresight_configure
2019-Jan-09 16:47:53  . . . . . nRF52_coresight_configure:	JLink:	JLINK_CORESIGHT_Configure()
2019-Jan-09 16:47:53  . . . . . nRF52_coresight_configure:	JLink:	  returns 0
2019-Jan-09 16:47:53  . . . . . nRF52_coresight_configure:	JLink:	 (0102ms, 0219ms total)  
2019-Jan-09 16:47:53  . . . . . nRF52_power_debug_and_system_regions
2019-Jan-09 16:47:53  . . . . . . nRF52_write_debug_port_register
2019-Jan-09 16:47:53  . . . . . . nRF52_write_debug_port_register:	JLink:	JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
2019-Jan-09 16:47:53  . . . . . . nRF52_write_debug_port_register:	JLink:	  returns -1
2019-Jan-09 16:47:53  . . . . . . nRF52_write_debug_port_register:	JLink:	 (0003ms, 0223ms total)  
2019-Jan-09 16:47:53  . . . . . . nRF52_write_debug_port_register:	JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.

2019-Jan-09 16:47:53  . . . . . nRF52_power_debug_and_system_regions:	JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.

2019-Jan-09 16:47:53  nRF_close_dll
2019-Jan-09 16:47:53  . nRF52_close_dll
2019-Jan-09 16:47:53  . . nRF52_is_connected_to_emu
2019-Jan-09 16:47:53  . . nRF52_is_connected_to_emu:	JLink:	JLINK_IsOpen()
2019-Jan-09 16:47:53  . . nRF52_is_connected_to_emu:	JLink:	  returns 0x01
2019-Jan-09 16:47:53  . . nRF52_is_connected_to_emu:	JLink:	 (0002ms, 0226ms total)  
2019-Jan-09 16:47:53  . . nRF52_disconnect_from_emu
2019-Jan-09 16:47:53  . . . nRF52_is_connected_to_device
2019-Jan-09 16:47:53  . . . nRF52_is_connected_to_device:	JLink:	JLINK_IsConnected()
2019-Jan-09 16:47:53  . . . nRF52_is_connected_to_device:	JLink:	  returns FALSE
2019-Jan-09 16:47:53  . . . nRF52_is_connected_to_device:	JLink:	 (0001ms, 0228ms total)  
2019-Jan-09 16:47:53  . . . nRF52_unpower_debug_and_system_regions
2019-Jan-09 16:47:53  . . nRF52_disconnect_from_emu:	JLink:	JLINK_Close()


As of now,
though not able to connect from SES debugger, but able to detect the USB drive JLink in windows when connected.
Then, by copying hex, say, ble_app_bps_pca10056_s140  not able detect using BPM in the nRF Toolbox Android app.
Only nRF Connect Android app is able to detect & connect.
==> may be, even though JLink drive disappears and appears back in Windows, does not mean flashing successful ? There is no ERROR log file inside the JLink drive !

Log from nRF Connect Android app:

nRF Connect, 2019-01-09
No name (F8:6C:37:43:D3:B1)
I	14:15:08.217	[Server] Server started
V	14:15:08.240	Heart Rate (0x180D)
- Heart Rate Measurement [N] (0x2A37)
 Client Characteristic Configuration (0x2902)
- Body Sensor Location [R] (0x2A38)
- Heart Rate Control Point [W] (0x2A39)
Unknown Service (0000aaa0-0000-1000-8000-aabbccddeeff)
- Unknown Characteristic [N R] (0000aaa1-0000-1000-8000-aabbccddeeff)
 Client Characteristic Configuration (0x2902)
 Unknown Descriptor (0000aab0-0000-1000-8000-aabbccddeeff)
 Characteristic User Description (0x2901)
 Characteristic Presentation Format (0x2904)
- Unknown Characteristic [I W WNR] (0000aaa2-0000-1000-8000-aabbccddeeff)
 Client Characteristic Configuration (0x2902)
User Data (0x181C)
- First Name [R W] (0x2A8A)
- Last Name [R W] (0x2A90)
- Gender [R W] (0x2A8C)
V	14:15:08.711	Connecting to F8:6C:37:43:D3:B1...
D	14:15:08.711	gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE)
D	14:15:13.828	[Server callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I	14:15:13.829	[Server] Device with address F8:6C:37:43:D3:B1 connected
D	14:15:13.911	[Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
D	14:15:13.944	[Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I	14:15:13.944	Connected to F8:6C:37:43:D3:B1
V	14:15:13.965	Discovering services...
D	14:15:13.965	gatt.discoverServices()
D	14:15:14.329	[Callback] Services discovered with status: 0
I	14:15:14.329	Services discovered
V	14:15:14.342	Generic Access (0x1800)
- Device Name [R W] (0x2A00)
- Appearance [R] (0x2A01)
- Peripheral Preferred Connection Parameters [R] (0x2A04)
- Central Address Resolution [R] (0x2AA6)
Generic Attribute (0x1801)
Nordic LED Button Service (00001523-1212-efde-1523-785feabcd123)
- Button [N R] (00001524-1212-efde-1523-785feabcd123)
 Client Characteristic Configuration (0x2902)
D	14:15:14.342	gatt.setCharacteristicNotification(00001524-1212-efde-1523-785feabcd123, true)


When tried the blinky example, the 4 LEDs 1 ~ 4 are not working.

Another PCA10056 board is working well with the SES. ==> may not have any issues with SES.

What should I do to bring up the board !? Please guide me.

PS: I have gone through other few QAs related, in Nordic & Segger support. Couldn't find this issue.

 Thanks in advance !

Parents Reply
  • I cannot see any obvious issues on your images. Have you tried flashing the DK by connecting a cable from "Debug out" on a working DK to "Debug in" on the failing DK to see if you are able to flash it that way? 

    When you place the PPK on top of the DK, you are actually flashing the nRF52832 IC on the PPK (when the COM switch is in DK position). This seems to indicate that the J-Link debug chip is working as expected, and that there is some issue with the nRF chip on the DK.

Children
  • >>> connecting a cable from "Debug out" on a working DK to "Debug in" on the failing DK

    I will try this later.

    But, may I know, is there any way to use "nRF USB" port for flashing nRF52 ??

  • Pra_Engr said:
    I will try this later.

     Ok, let me know if you make it work.

    Pra_Engr said:
    But, may I know, is there any way to use "nRF USB" port for flashing nRF52 ??

    We have a serial DFU solution that works over the nRF USB port, but this requires you to first flash the serial USB DFU bootloader to the chip. 

  • I tried connecting the Debug Out from working DK board to the Debug In - failing DK.

    Working board - DEFAULT switch.

    Failing board - nRF Only switch, and external powered. (Confirmed the nRF52 is powered)

    Now, still it fails to program from SES with the same error.

    Connecting ‘J-Link’ using ‘USB’
    Connecting to target using SWD
    Loaded C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.12/bin/JLink_x64.dll
    Firmware Version: J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 12 2018 11:44:41
    DLL Version: 6.40`
    Hardware Version: V1.00
    Target Voltage: 3.300
    Device "NRF52840_XXAA" selected.
    connect failed
    Failed to connect to target.
    No idcode detected.
    Please check connection and Target Interface Type
    

    With this setup, I tried nRF Connect PC application -> Bluetooth Low Energy.

    It is not able to connect. Error

    2019-01-18T15:06:08.557Z INFO Application data folder: C:\Users\pkrishna\AppData\Roaming\nrfconnect\pc-nrfconnect-ble
    2019-01-18T15:06:08.658Z DEBUG App pc-nrfconnect-ble v2.2.0 official
    2019-01-18T15:06:08.658Z DEBUG App path: C:\Users\pkrishna\.nrfconnect-apps\node_modules\pc-nrfconnect-ble
    2019-01-18T15:06:08.658Z DEBUG nRFConnect 2.6.1 is supported by the app (^2.4.0)
    2019-01-18T15:06:08.658Z DEBUG nRFConnect path: C:\Users\pkrishna\AppData\Local\Programs\nrfconnect\resources\app.asar
    2019-01-18T15:06:08.658Z DEBUG HomeDir: C:\Users\pkrishna
    2019-01-18T15:06:08.658Z DEBUG TmpDir: C:\Users\pkrishna\AppData\Local\Temp
    2019-01-18T15:06:08.666Z VERBOSE Could not fetch serial number for serial port at COM1
    2019-01-18T15:07:07.537Z INFO Validating connectivity firmware for device with serial number 000683256424...
    2019-01-18T15:07:09.089Z ERROR Error while setting up device 000683256424: Error occured when close opened device. Errorcode: CouldNotOpenDevice (0x4)
    Lowlevel error: JLINKARM_DLL_ERROR (ffffff9a)
    
    2019-01-18T15:07:09.092Z INFO Device closed.
    

    Same error when using nRF Connect PC application -> Power Profiler.

    In case of nRF Connect PC application -> Programmer, it hangs at trying to detect Device Memory Layout.

    2019-01-18T15:13:05.275Z INFO Parsing HEX file:  C:\Nordic\SDK1520\examples\nfc\wake_on_nfc\hex\wake_on_nfc_pca10056.hex
    2019-01-18T15:13:05.275Z INFO File was last modified at  9/8/2018, 7:46:16 AM
    2019-01-18T15:13:05.286Z INFO Data block: 0x00000000-0x00003A44 (0x00003A44  bytes long)
    2019-01-18T15:13:14.893Z INFO Using nrfjprog to communicate with target
    

  • It sounds like this board could be broken. Which version of the PCA10056 is this?

  • PCA10056

    1.0.0

    2018.46

    1. Even if broken, is there not a debugger or any way to flash the IC nRF52840?

    Because IC is still working.

    I suppose, I have bricked it or is in non-writable state, something like mass production programming.

    2. Via BLE, possible to update firmware?

Related