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

Cannot connect to external nRF52832, no idcode detected

Hello, I'm trying to write code to a custom PCB with a nRF52832 using the nRF52 DK and the following wiring:

However, everytime I try to connect the JLink is says that there is an error and that no idcode detected, see this screenshot below:

So, I'm doing something wrong?, I can write code to the internal nRF52832 chip, I noticed that the onboard chip is a nRF52832_XXAA and mine is nRF52832_XXAB, however I changed the project options to select that target and still the error shows up, I think there's something wrong with the SWDIO and SWCLK pins, as if I disconnect those from my custom board I just get the same error without noticeable changes, anyone can help me?

Parents
  • Hi Ronald, 

    It seems correct the way you connect your external board. Could you try using nrfjprog.exe (or Jlink) tool to access the chip ? 

    Please send us a close up photo of your setup as well. You can convert this case to private case if there is confidential information. 

  • Hello Hung, okay, here is the setup:

    Please look closely, there is a green wire coming out from nRF5 DK to the bottom right corner of my custom PCB (On J5), that's the positive input of my PCB, and the black wire is ground. Now, I have J3 on the top right corner, that's where the connectio to SWDIO and SWDCLK is made, the yellow one is SWDIO and the green one is SWDCLK, the blue one goes to VTG, as the PCB is powered by the nRF5 DK if the power goes through well J3 should have VDD too, so the nRF5 DK will receive the signal to program the external chip.

    Now, I'm 100% sure that my connections over J3 goes to SWDIO and SWDCLK as I checked continuity multiple times, once I power up the nRF5 DK I can measure 2.9V over pins 48 and 45 in the nRF52832, so I believe it have power.

    What I'm doing wrong?

    I also ran this command to test nrfjprog:

    nrfjprog -f NRF52 --program ble_app_uart_pca10040_s132.hex --chiperase --log

    The output was the following error:

    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.

    And here is the log.log file:

    2018-Dec-28 16:39:51  --------------------------------------------------------------------------------
    2018-Dec-28 16:39:51  nrfjprog -f NRF52 --program ble_app_uart_pca10040_s132.hex --chiperase --log
    2018-Dec-28 16:39:51  nrfjprog version 9.8.1
    2018-Dec-28 16:39:51  --------------------------------------------------------------------------------
    2018-Dec-28 16:39:51  nRF_open_dll
    2018-Dec-28 16:39:51  . nRF52_open_dll
    2018-Dec-28 16:39:51  . . nRF52_dll_version
    2018-Dec-28 16:39:51  nRF_enum_emu_snr
    2018-Dec-28 16:39:51  . nRF52_enum_emu_snr
    2018-Dec-28 16:39:51  . . nRF52_enum_emu_snr
    2018-Dec-28 16:39:52  nRF_enum_emu_snr
    2018-Dec-28 16:39:52  . nRF52_enum_emu_snr
    2018-Dec-28 16:39:52  . . nRF52_enum_emu_snr
    2018-Dec-28 16:39:52  nRF_connect_to_emu_with_snr
    2018-Dec-28 16:39:52  . nRF52_connect_to_emu_with_snr
    2018-Dec-28 16:39:52  . . nRF52_is_connected_to_emu
    2018-Dec-28 16:39:52  . . nRF52_enum_emu_snr
    2018-Dec-28 16:39:52  . . nRF52_connect_to_emu_with_snr
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	JLink:	 Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 12 2018 11:44:41
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	JLink:	 Hardware: V1.00
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	JLink:	 S/N: 682384600
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	JLink:	 TELNET listener socket opened on port 19021
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	JLink:	WEBSRV  Starting webserver
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0004ms, 1109ms total)  
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	JLink:	TFF6CA740 001:106 
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	JLink:	WEBSRV Webserver running on local port 19080
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0004ms, 1109ms total)  
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	JLink:	TFF6CA740 001:106 
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns O.K.
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0004ms, 1109ms total)  
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	JLink:	TFF6CA740 001:110 
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_GetHWStatus(...)
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0000ms, 1109ms total)  
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	There is no generic nRF52 device in J-Link, so we select NRF52832_xxAA.
    
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	JLink:	TFF6CA740 001:111 
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("Device = NRF52832_xxAA", ...). 
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	JLink:	XML file found at: /opt/SEGGER/JLink/JLinkDevices.xml
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0000ms, 1110ms total)  
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	JLink:	TFF6CA740 001:111 
    2018-Dec-28 16:39:52  . . . nRF52_connect_to_emu_without_snr:	JLink:	/opt/SEGGER/JLink/JLinkDevices.xml evaluated successfully.
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	Device "NRF52832_XXAA" selected.
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	Device "NRF52832_XXAA" selected.
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0076ms, 1186ms total)  
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	TFF6CA740 001:187 
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("SetRestartOnClose = 0", ...). 
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x01
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0000ms, 1186ms total)  
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	TFF6CA740 001:187 
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("DisableFlashDL", ...). 
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0000ms, 1186ms total)  
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	TFF6CA740 001:187 
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("SetDbgPowerDownOnClose = 1", ...). 
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x01
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0000ms, 1186ms total)  
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	TFF6CA740 001:187 
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...). 
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0001ms, 1187ms total)  
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	TFF6CA740 001:188 
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_TIF_Select(JLINKARM_TIF_SWD)
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0000ms, 1187ms total)  
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	TFF6CA740 001:188 
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_SetSpeed(2000)
    2018-Dec-28 16:39:53  . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0000ms, 1187ms total)  
    2018-Dec-28 16:39:53  nRF_read_device_version
    2018-Dec-28 16:39:53  . nRF52_read_device_version
    2018-Dec-28 16:39:53  . . nRF52_is_connected_to_emu
    2018-Dec-28 16:39:53  . . nRF52_is_connected_to_emu:	JLink:	TFF6CA740 001:188 
    2018-Dec-28 16:39:53  . . nRF52_is_connected_to_emu:	JLink:	JLINK_IsOpen()
    2018-Dec-28 16:39:53  . . nRF52_is_connected_to_emu:	JLink:	  returns 0x01
    2018-Dec-28 16:39:53  . . nRF52_is_connected_to_emu:	JLink:	 (0000ms, 1187ms total)  
    2018-Dec-28 16:39:53  . . nRF52_is_connected_to_device
    2018-Dec-28 16:39:53  . . nRF52_is_connected_to_device:	JLink:	TFF6CA740 001:188 
    2018-Dec-28 16:39:53  . . nRF52_is_connected_to_device:	JLink:	JLINK_IsConnected()
    2018-Dec-28 16:39:53  . . nRF52_is_connected_to_device:	JLink:	  returns FALSE
    2018-Dec-28 16:39:53  . . nRF52_is_connected_to_device:	JLink:	 (0001ms, 1188ms total)  
    2018-Dec-28 16:39:53  . . nRF52_readback_status
    2018-Dec-28 16:39:53  . . . nRF52_is_ctrl_ap_available
    2018-Dec-28 16:39:53  . . . . nRF52_read_access_port_register
    2018-Dec-28 16:39:53  . . . . . nRF52_coresight_configure
    2018-Dec-28 16:39:53  . . . . . nRF52_coresight_configure:	JLink:	TFF6CA740 001:189 
    2018-Dec-28 16:39:53  . . . . . nRF52_coresight_configure:	JLink:	JLINK_CORESIGHT_Configure()
    2018-Dec-28 16:39:53  . . . . . nRF52_coresight_configure:	JLink:	  returns 0
    2018-Dec-28 16:39:53  . . . . . nRF52_coresight_configure:	JLink:	 (0102ms, 1290ms total)  
    2018-Dec-28 16:39:53  . . . . . nRF52_power_debug_and_system_regions
    2018-Dec-28 16:39:53  . . . . . . nRF52_write_debug_port_register
    2018-Dec-28 16:39:53  . . . . . . nRF52_write_debug_port_register:	JLink:	TFF6CA740 001:291 
    2018-Dec-28 16:39:53  . . . . . . nRF52_write_debug_port_register:	JLink:	JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
    2018-Dec-28 16:39:53  . . . . . . nRF52_write_debug_port_register:	JLink:	  returns -1
    2018-Dec-28 16:39:53  . . . . . . nRF52_write_debug_port_register:	JLink:	 (0001ms, 1291ms total)  
    2018-Dec-28 16:39:53  . . . . . . nRF52_write_debug_port_register:	JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.
    
    2018-Dec-28 16:39:53  . . . . . nRF52_power_debug_and_system_regions:	JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.
    
    2018-Dec-28 16:39:53  nRF_close_dll
    2018-Dec-28 16:39:53  . nRF52_close_dll
    2018-Dec-28 16:39:53  . . nRF52_is_connected_to_emu
    2018-Dec-28 16:39:53  . . nRF52_is_connected_to_emu:	JLink:	TFF6CA740 001:293 
    2018-Dec-28 16:39:53  . . nRF52_is_connected_to_emu:	JLink:	JLINK_IsOpen()
    2018-Dec-28 16:39:53  . . nRF52_is_connected_to_emu:	JLink:	  returns 0x01
    2018-Dec-28 16:39:53  . . nRF52_is_connected_to_emu:	JLink:	 (0000ms, 1291ms total)  
    2018-Dec-28 16:39:53  . . nRF52_disconnect_from_emu
    2018-Dec-28 16:39:53  . . . nRF52_is_connected_to_device
    2018-Dec-28 16:39:53  . . . nRF52_is_connected_to_device:	JLink:	TFF6CA740 001:293 
    2018-Dec-28 16:39:53  . . . nRF52_is_connected_to_device:	JLink:	JLINK_IsConnected()
    2018-Dec-28 16:39:53  . . . nRF52_is_connected_to_device:	JLink:	  returns FALSE
    2018-Dec-28 16:39:53  . . . nRF52_is_connected_to_device:	JLink:	 (0001ms, 1292ms total)  
    2018-Dec-28 16:39:53  . . . nRF52_unpower_debug_and_system_regions
    2018-Dec-28 16:39:53  . . nRF52_disconnect_from_emu:	JLink:	TFF6CA740 001:314 
    2018-Dec-28 16:39:53  . . nRF52_disconnect_from_emu:	JLink:	JLINK_Close()
    

    Any hints?, if you need any other explaination please let me know

    I don't know if I already mention it but I'm using ubuntu

  • Hi,

    I assume you checked and found the VTG has 3.3 V ?

    Please check if SWDIO and SWDCLK connected correctly. I would suggest to shorten the length of the 2 cables. Keep it less than 10cm. Check the pins of the chip, make sure they are soldered correctly. 

  • Is the SWD connector on your custom board a standard ARM coresight 10 pins ? If so, your wiring seems to be incorrect.  You can use the Debug Out on the DK to connect to it if yours is coresight and add VDD & GND.  

  • Hello Hung,

    Yes. I checked VTG, however It has 2.9V is that enough?

    I reduced the length of the wires going to SWDIO and SWDCLK, I'm pretty sure they are now less than 10cm, I checked continuity from the female jumper's plate on the nRF52 DK to the nRF chip itself and everything seems ok, however I still cannot connect to the nRF chip through JLink.

    The log.log file doesn't hint anything?, I cannot tell if my custom PCB is the problem as I checked everything and it seems to be fine, I also tried to run everything as root but got the same errors.

    Any other suggestion?

Reply
  • Hello Hung,

    Yes. I checked VTG, however It has 2.9V is that enough?

    I reduced the length of the wires going to SWDIO and SWDCLK, I'm pretty sure they are now less than 10cm, I checked continuity from the female jumper's plate on the nRF52 DK to the nRF chip itself and everything seems ok, however I still cannot connect to the nRF chip through JLink.

    The log.log file doesn't hint anything?, I cannot tell if my custom PCB is the problem as I checked everything and it seems to be fine, I also tried to run everything as root but got the same errors.

    Any other suggestion?

Children
No Data
Related