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

Cannot connect to custom external nRF52810_CAAA using SWD/JLink

I have produced ~ 15 different custom board variations that all use the nRF52810-CAAA. They all have the same reference schematic, and use 4 programming pins (V, G, SWDIO, SWDCLOCK). I have programming jigs with pogo pins that I use to program the boards. For 14 of the designs I have had no issues, I can program them however I want. I connect the programming jig/external board to an nRF52 DK and can flash firmware using Segger, JLinkExe, nRF Connect, whatever I like.

One board version that I just got cannot be programmed, I ordered 10 boards and 0 of them can be programmed. Using segger, I get the error:

"Failed to connect to target. No idcode detected. Please check connection interface"

When I use JLinkExe with command "JLinkExe -device nRF52 -if SWD -autoconnect 1 -speed 4000", I get the output:

SEGGER J-Link Commander V6.86f (Compiled Oct 23 2020 17:58:41) 
DLL version V6.86f, compiled Oct 23 2020 17:58:30 

Connecting to J-Link via USB...O.K. 
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 17 2020 14:43:00 
Hardware version: V1.00 
S/N: 682383579 
License(s): RDI, FlashBP, FlashDL, JFlash, GDB 
VTref=3.300V 
Device "NRF52" 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.

 

I've tried with various speeds and get the same results, When I print to a log, approximately 59 million lines are printed. The log file begins like this:

2020-Oct-30 13:37:28  --------------------------------------------------------------------------------
2020-Oct-30 13:37:28  nrfjprog -f NRF52 --program ble_app_uart_pca10040e_s112.hex --chiperase --log 
2020-Oct-30 13:37:28  nrfjprog version 10.5.0 
2020-Oct-30 13:37:28  --------------------------------------------------------------------------------
2020-Oct-30 13:37:28  nRF_logger_open
2020-Oct-30 13:37:28  nRF_logger_open:  nRFJProg logger opened to callback at address 0X55DE9CA015D0
2020-Oct-30 13:37:28  nRF_open_dll
2020-Oct-30 13:37:28  nRF_open_dll:     Load library at "/opt/nrfjprog/libjlinkarm_nrf52_nrfjprogdll.so".

2020-Oct-30 13:37:28  . nRF52_logger_open
2020-Oct-30 13:37:28  . nRF52_logger_open:      nRFJProg logger opened to callback at address 0X7F11E98FEEA0
2020-Oct-30 13:37:28  . nRF52_open_dll
2020-Oct-30 13:37:28  . . Segger_logger_open
2020-Oct-30 13:37:28  . . Segger_logger_open:   nRFJProg logger opened to callback at address 0X7F11E955C850
2020-Oct-30 13:37:28  . . Segger_open_dll
2020-Oct-30 13:37:28  . . Segger_open_dll:      Load library at "/opt/SEGGER/JLink/libjlinkarm.so.6".

2020-Oct-30 13:37:28  . . . Segger_dll_version
2020-Oct-30 13:37:28  . . Segger_set_core_data
2020-Oct-30 13:37:28  nRF_enum_emu_snr
2020-Oct-30 13:37:28  . nRF52_enum_emu_snr
2020-Oct-30 13:37:28  . . Segger_enum_emu_snr
2020-Oct-30 13:37:28  . . . Segger_enum_emu_snr
2020-Oct-30 13:37:28  . . . . Segger_get_num_emus
2020-Oct-30 13:37:28  nRF_connect_to_emu_with_snr
2020-Oct-30 13:37:28  . nRF52_connect_to_emu_with_snr
2020-Oct-30 13:37:28  . . Segger_connect_to_emu_with_snr
2020-Oct-30 13:37:28  . . . Segger_is_connected_to_emu
2020-Oct-30 13:37:28  . . . Segger_enum_emu_snr
2020-Oct-30 13:37:28  . . . . Segger_get_num_emus
2020-Oct-30 13:37:28  . . . Segger_connect_to_emu_with_snr
2020-Oct-30 13:37:28  . . . . Segger_connect_to_emu_without_snr
2020-Oct-30 13:37:28  . . . . Segger_connect_to_emu_without_snr:        Segger logging enabled with callback at 0x139714905884048.

2020-Oct-30 13:37:28  . . . . . Segger_load_core_data
2020-Oct-30 13:37:28  nRF_read_device_version
2020-Oct-30 13:37:28  . nRF52_read_device_version
2020-Oct-30 13:37:28  . . nRF52_readback_status
2020-Oct-30 13:37:28  . . . nRF52_is_ctrl_ap_available
2020-Oct-30 13:37:28  . . . . Segger_read_access_port_register
2020-Oct-30 13:37:28  . . . . . Segger_is_connected_to_emu
2020-Oct-30 13:37:28  . . . . . Segger_read_access_port_register
2020-Oct-30 13:37:28  . . . . . . Segger_coresight_configure
2020-Oct-30 13:37:29  . . . . . . Segger_is_debug_region_powered
2020-Oct-30 13:37:29  . . . . . . . Segger_read_debug_port_register
2020-Oct-30 13:37:29  . . . . . . . . Segger_write_debug_port_register
2020-Oct-30 13:37:29  . . . . . . . . Segger_write_debug_port_register: JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.

2020-Oct-30 13:37:29  . . . . . . . . . Segger_abort_debug_action
2020-Oct-30 13:37:29  . . . . . . . . . Segger_abort_debug_action:      Attempting to clear any configuration errors in debug port before closing connection. 

2020-Oct-30 13:37:29  . . . . . . . . . . Segger_write_debug_port_register
2020-Oct-30 13:37:29  . . . . . . . . . . Segger_write_debug_port_register:     JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.

2020-Oct-30 13:37:29  . . . . . . . . . . . Segger_abort_debug_action
2020-Oct-30 13:37:29  . . . . . . . . . . . Segger_abort_debug_action:  Attempting to clear any configuration errors in debug port before closing connection. 

2020-Oct-30 13:37:29  . . . . . . . . . . . . Segger_write_debug_port_register
2020-Oct-30 13:37:29  . . . . . . . . . . . . Segger_write_debug_port_register: JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.

2020-Oct-30 13:37:29  . . . . . . . . . . . . . Segger_abort_debug_action
2020-Oct-30 13:37:29  . . . . . . . . . . . . . Segger_abort_debug_action:      Attempting to clear any configuration errors in debug port before closing connection. 

2020-Oct-30 13:37:29  . . . . . . . . . . . . . . Segger_write_debug_port_register
2020-Oct-30 13:37:29  . . . . . . . . . . . . . . Segger_write_debug_port_register:     JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.

2020-Oct-30 13:37:29  . . . . . . . . . . . . . . . Segger_abort_debug_action
2020-Oct-30 13:37:29  . . . . . . . . . . . . . . . Segger_abort_debug_action:  Attempting to clear any configuration errors in debug port before closing connection. 

2020-Oct-30 13:37:29  . . . . . . . . . . . . . . . . Segger_write_debug_port_register
2020-Oct-30 13:37:29  . . . . . . . . . . . . . . . . Segger_write_debug_port_register: JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.

2020-Oct-30 13:37:29  . . . . . . . . . . . . . . . . . Segger_abort_debug_action
2020-Oct-30 13:37:29  . . . . . . . . . . . . . . . . . Segger_abort_debug_action:      Attempting to clear any configuration errors in debug port before closing connection. 

After these first 75 lines, the same "JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1" is printed until "Error, log buffer is full" is printed after about ~1200 lines, and then this log buffer full message is printed for the remaining 59 million lines.

Clearly there must be some sort of hardware issue on my board. Using the same exact jig and the same exact programming setup, I can flash other PCB designs no problem. So supplied voltages, wire lengths, etc are not an issue or else the setup wouldn't work for any boards. Can anyone give me some insights to things I should debug and figure out why this is happening? I could just submit more boards to production and see if it is a yield issue, but I'd like to spend some time finding a cause of this issue before just blindly spending more money and praying the PCB gods can fix it. I've spent a few hours now searching forums and previous posts and trying suggestions, like connecting Vdd NRF instead of VDD on P20, removing GND Detect, various JLinkExe flashing speeds, I've thoroughly cleaned the programming pads on my custom board, measured impedance across Vdd and GND on my external board, etc.

Parents Reply Children
No Data
Related