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

Using nRF52840 DK to program a second nRF52840 SoC

Hello,

I have an nRF52840 chip (Holyiot nRF52840 module) and I want to program the chip using an nRF52840 DK. The Holyiot module is basically an nRF52840 mounted on a PCB.

https://www.aliexpress.com/item/holyiot-18010-Nordic-nRF52840-module-Bluetooth-low-energy-development-board-for-BLE-mesh-bluetooth-5/32868002366.html

So, I connected the following pins to P20 connector of nRF52840 DK and tried to program with nRFgo Studio. Although I am able to program nRF52840 DK itself, I am not able to program the second device.

1. P20. 1 (VDD_nRF) to V_nRF. In Holyiot, this is VDD/VDDH.

2. P20. 3 (SH_VTG) to V_nRF.

3. P20. 4 (SH_SWDIO) to SWDIO

4. P20. 5 (SH_SWCLK) to SWCLK

5. P20. 8 (SH_GND_DETECT) to GND.

5. P1. GND to GND (three GND pins on Holyiot).

The above setting did not work, I also connected VBUS to GND, no change.

Can you please help me find the problem?

Thanks

  • What error message do you get when you call nrfjprog with '-f nrf52 -e'?

  • I didn't check with nrfjprog. Will let you know on Monday.

  • Hi, I just tested with  nrfjprog -f NRF52 -e --log --program file.hex --chiperase and received the following errors and the attached log file:


    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.

    --------------------------------------------------------------------------------
    nrfjprog -f NRF52 -e --log --program file.hex --chiperase
    nrfjprog version 9.7.3
    --------------------------------------------------------------------------------
    nRF_open_dll
    . nRF52_open_dll
    . . nRF52_dll_version
    nRF_enum_emu_snr
    . nRF52_enum_emu_snr
    . . nRF52_enum_emu_snr
    nRF_enum_emu_snr
    . nRF52_enum_emu_snr
    . . nRF52_enum_emu_snr
    nRF_connect_to_emu_with_snr
    . nRF52_connect_to_emu_with_snr
    . . nRF52_is_connected_to_emu
    . . nRF52_enum_emu_snr
    . . nRF52_connect_to_emu_with_snr
    . . . nRF52_connect_to_emu_without_snr
    . . . nRF52_connect_to_emu_without_snr:	JLink:	 Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 12 2018 16:05:20
    . . . nRF52_connect_to_emu_without_snr:	JLink:	 Hardware: V1.00
    . . . nRF52_connect_to_emu_without_snr:	JLink:	 S/N: 683471410
    . . . nRF52_connect_to_emu_without_snr:	JLink:	 TELNET listener socket opened on port 19021
    . . . nRF52_connect_to_emu_without_snr:	JLink:	WEBSRV  Starting webserver
    . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0021ms, 0027ms total)  
    . . . nRF52_connect_to_emu_without_snr:	JLink:	WEBSRV Webserver running on local port 19080
    . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0024ms, 0030ms total)  
    . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns O.K.
    . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0027ms, 0033ms total)  
    . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_GetHWStatus(...)
    . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
    . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0007ms, 0042ms total)  
    . . . nRF52_connect_to_emu_without_snr:	There is no generic nRF52 device in J-Link, so we select NRF52832_xxAA.
    
    . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("Device = NRF52832_xxAA", ...). 
    . . . nRF52_connect_to_emu_without_snr:	JLink:	C:\Program Files (x86)\SEGGER\JLink_V622g\JLinkDevices.xml evaluated successfully.
    . . . nRF52_connect_to_emu_without_snr:	JLink:	Device "NRF52832_XXAA" selected.
    . . . nRF52_connect_to_emu_without_snr:	JLink:	Device "NRF52832_XXAA" selected.
    . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
    . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0157ms, 0202ms total)  
    . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("SetRestartOnClose = 0", ...). 
    . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x01
    . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0000ms, 0205ms total)  
    . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("DisableFlashDL", ...). 
    . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
    . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0000ms, 0207ms total)  
    . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("SetDbgPowerDownOnClose = 1", ...). 
    . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x01
    . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0001ms, 0210ms total)  
    . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...). 
    . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
    . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0001ms, 0213ms total)  
    . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_TIF_Select(JLINKARM_TIF_SWD)
    . . . nRF52_connect_to_emu_without_snr:	JLink:	  returns 0x00
    . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0002ms, 0216ms total)  
    . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_SetSpeed(2000)
    . . . nRF52_connect_to_emu_without_snr:	JLink:	 (0001ms, 0218ms total)  
    nRF_read_device_version
    . nRF52_read_device_version
    . . nRF52_is_connected_to_emu
    . . nRF52_is_connected_to_emu:	JLink:	JLINK_IsOpen()
    . . nRF52_is_connected_to_emu:	JLink:	  returns 0x01
    . . nRF52_is_connected_to_emu:	JLink:	 (0002ms, 0221ms total)  
    . . nRF52_is_connected_to_device
    . . nRF52_is_connected_to_device:	JLink:	JLINK_IsConnected()
    . . nRF52_is_connected_to_device:	JLink:	  returns FALSE
    . . nRF52_is_connected_to_device:	JLink:	 (0002ms, 0224ms total)  
    . . nRF52_readback_status
    . . . nRF52_is_ctrl_ap_available
    . . . . nRF52_read_access_port_register
    . . . . . nRF52_coresight_configure
    . . . . . nRF52_coresight_configure:	JLink:	JLINK_CORESIGHT_Configure()
    . . . . . nRF52_coresight_configure:	JLink:	  returns 0
    . . . . . nRF52_coresight_configure:	JLink:	 (0103ms, 0328ms total)  
    . . . . . nRF52_power_debug_and_system_regions
    . . . . . . nRF52_write_debug_port_register
    . . . . . . nRF52_write_debug_port_register:	JLink:	JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
    . . . . . . nRF52_write_debug_port_register:	JLink:	  returns -1
    . . . . . . nRF52_write_debug_port_register:	JLink:	 (0004ms, 0333ms total)  
    . . . . . . nRF52_write_debug_port_register:	JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.
    
    . . . . . nRF52_power_debug_and_system_regions:	JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.
    
    nRF_close_dll
    . nRF52_close_dll
    . . nRF52_is_connected_to_emu
    . . nRF52_is_connected_to_emu:	JLink:	JLINK_IsOpen()
    . . nRF52_is_connected_to_emu:	JLink:	  returns 0x01
    . . nRF52_is_connected_to_emu:	JLink:	 (0002ms, 0336ms total)  
    . . nRF52_disconnect_from_emu
    . . . nRF52_is_connected_to_device
    . . . nRF52_is_connected_to_device:	JLink:	JLINK_IsConnected()
    . . . nRF52_is_connected_to_device:	JLink:	  returns FALSE
    . . . nRF52_is_connected_to_device:	JLink:	 (0002ms, 0339ms total)  
    . . . nRF52_unpower_debug_and_system_regions
    . . nRF52_disconnect_from_emu:	JLink:	JLINK_Close()
    

  • Follow up:

    I need you to call nrfjprog --version in order to get the JLink dll version. We have experienced som issues with certain jlink driver version. 

  • This returns:

    nrfjprog version: 9.7.3
    JLinkARM.dll version: 6.22g

Related