Particle mesh + nrfjprog [solved]

I’m trying to program the Xenon board with nrfjprog, but cannot get it connected correctly. (Connection is standard SEGGER cable)

nrfjprog -f NRF52 --halt --log

gives me following feedback :slight_smile:

2018-Dec-06 08:08:52  --------------------------------------------------------------------------------
2018-Dec-06 08:08:52  nrfjprog -f NRF52 --halt --log
2018-Dec-06 08:08:52  nrfjprog version 9.8.1
2018-Dec-06 08:08:52  --------------------------------------------------------------------------------
2018-Dec-06 08:08:53  nRF_open_dll
2018-Dec-06 08:08:53  . nRF52_open_dll
2018-Dec-06 08:08:53  . . nRF52_dll_version
2018-Dec-06 08:08:53  nRF_enum_emu_snr
2018-Dec-06 08:08:53  . nRF52_enum_emu_snr
2018-Dec-06 08:08:53  . . nRF52_enum_emu_snr
2018-Dec-06 08:08:53  nRF_enum_emu_snr
2018-Dec-06 08:08:53  . nRF52_enum_emu_snr
2018-Dec-06 08:08:53  . . nRF52_enum_emu_snr
2018-Dec-06 08:08:53  nRF_connect_to_emu_with_snr
2018-Dec-06 08:08:53  . nRF52_connect_to_emu_with_snr
2018-Dec-06 08:08:53  . . nRF52_is_connected_to_emu
2018-Dec-06 08:08:53  . . nRF52_enum_emu_snr
2018-Dec-06 08:08:53  . . nRF52_connect_to_emu_with_snr
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:   Firmware: J-Link EDU Mini V1 compiled Feb  2 2018 18:14:03
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:   Hardware: V1.00
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:   S/N: 801007416
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:   Feature(s): FlashBP, FlashBP
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:   TELNET listener socket opened on port 19021
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  WEBSRV  Starting webserver
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:   (0045ms, 0529ms total)
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  TDE5D740 000:487
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  WEBSRV Webserver running on local port 19080
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:   (0046ms, 0530ms total)
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  TDE5D740 000:487
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:    returns O.K.
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:   (0046ms, 0530ms total)
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  TDE5D740 000:533
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  JLINK_GetHWStatus(...)
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:    returns 0x00
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:   (0000ms, 0530ms total)
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   There is no generic nRF52 device in J-Link, so we select NRF52832_xxAA.

2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  TDE5D740 000:533
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  JLINK_ExecCommand("Device = NRF52832_xxAA", ...).
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  /opt/SEGGER/JLink/JLinkDevices.xml evaluated successfully.
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  Device "NRF52832_XXAA" selected.
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  Device "NRF52832_XXAA" selected.
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:    returns 0x00
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:   (0315ms, 0849ms total)
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  TDE5D740 000:852
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  JLINK_ExecCommand("SetRestartOnClose = 0", ...).
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:    returns 0x01
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:   (0000ms, 0849ms total)
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  TDE5D740 000:853
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  JLINK_ExecCommand("DisableFlashDL", ...).
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:    returns 0x00
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:   (0004ms, 0854ms total)
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  TDE5D740 000:857
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  JLINK_ExecCommand("SetDbgPowerDownOnClose = 1", ...).
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:    returns 0x01
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:   (0000ms, 0854ms total)
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  TDE5D740 000:857
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:    returns 0x00
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:   (0000ms, 0854ms total)
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  TDE5D740 000:857
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  JLINK_TIF_Select(JLINKARM_TIF_SWD)
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:    returns 0x00
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:   (0005ms, 0859ms total)
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  TDE5D740 000:862
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:  JLINK_SetSpeed(2000)
2018-Dec-06 08:08:53  . . . nRF52_connect_to_emu_without_snr:   JLink:   (0000ms, 0859ms total)
2018-Dec-06 08:08:53  nRF_read_device_version
2018-Dec-06 08:08:53  . nRF52_read_device_version
2018-Dec-06 08:08:53  . . nRF52_is_connected_to_emu
2018-Dec-06 08:08:53  . . nRF52_is_connected_to_emu:    JLink:  TDE5D740 000:862
2018-Dec-06 08:08:53  . . nRF52_is_connected_to_emu:    JLink:  JLINK_IsOpen()
2018-Dec-06 08:08:53  . . nRF52_is_connected_to_emu:    JLink:    returns 0x01
2018-Dec-06 08:08:53  . . nRF52_is_connected_to_emu:    JLink:   (0000ms, 0859ms total)
2018-Dec-06 08:08:53  . . nRF52_is_connected_to_device
2018-Dec-06 08:08:53  . . nRF52_is_connected_to_device: JLink:  TDE5D740 000:862
2018-Dec-06 08:08:53  . . nRF52_is_connected_to_device: JLink:  JLINK_IsConnected()
2018-Dec-06 08:08:53  . . nRF52_is_connected_to_device: JLink:    returns FALSE
2018-Dec-06 08:08:53  . . nRF52_is_connected_to_device: JLink:   (0000ms, 0859ms total)
2018-Dec-06 08:08:53  . . nRF52_readback_status
2018-Dec-06 08:08:53  . . . nRF52_is_ctrl_ap_available
2018-Dec-06 08:08:53  . . . . nRF52_read_access_port_register
2018-Dec-06 08:08:53  . . . . . nRF52_coresight_configure
2018-Dec-06 08:08:53  . . . . . nRF52_coresight_configure:      JLink:  TDE5D740 000:862
2018-Dec-06 08:08:53  . . . . . nRF52_coresight_configure:      JLink:  JLINK_CORESIGHT_Configure()
2018-Dec-06 08:08:54  . . . . . nRF52_coresight_configure:      JLink:    returns 0
2018-Dec-06 08:08:54  . . . . . nRF52_coresight_configure:      JLink:   (0101ms, 0960ms total)
2018-Dec-06 08:08:54  . . . . . nRF52_power_debug_and_system_regions
2018-Dec-06 08:08:54  . . . . . . nRF52_write_debug_port_register
2018-Dec-06 08:08:54  . . . . . . nRF52_write_debug_port_register:      JLink:  TDE5D740 000:963
2018-Dec-06 08:08:54  . . . . . . nRF52_write_debug_port_register:      JLink:  JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
2018-Dec-06 08:08:54  . . . . . . nRF52_write_debug_port_register:      JLink:    returns -1
2018-Dec-06 08:08:54  . . . . . . nRF52_write_debug_port_register:      JLink:   (0001ms, 0961ms total)
2018-Dec-06 08:08:54  . . . . . . nRF52_write_debug_port_register:      JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.

2018-Dec-06 08:08:54  . . . . . nRF52_power_debug_and_system_regions:   JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.

2018-Dec-06 08:08:54  nRF_close_dll
2018-Dec-06 08:08:54  . nRF52_close_dll
2018-Dec-06 08:08:54  . . nRF52_is_connected_to_emu
2018-Dec-06 08:08:54  . . nRF52_is_connected_to_emu:    JLink:  TDE5D740 000:965
2018-Dec-06 08:08:54  . . nRF52_is_connected_to_emu:    JLink:  JLINK_IsOpen()
2018-Dec-06 08:08:54  . . nRF52_is_connected_to_emu:    JLink:    returns 0x01
2018-Dec-06 08:08:54  . . nRF52_is_connected_to_emu:    JLink:   (0000ms, 0962ms total)
2018-Dec-06 08:08:54  . . nRF52_disconnect_from_emu
2018-Dec-06 08:08:54  . . . nRF52_is_connected_to_device
2018-Dec-06 08:08:54  . . . nRF52_is_connected_to_device:       JLink:  TDE5D740 000:965
2018-Dec-06 08:08:54  . . . nRF52_is_connected_to_device:       JLink:  JLINK_IsConnected()
2018-Dec-06 08:08:54  . . . nRF52_is_connected_to_device:       JLink:    returns FALSE
2018-Dec-06 08:08:54  . . . nRF52_is_connected_to_device:       JLink:   (0001ms, 0963ms total)
2018-Dec-06 08:08:54  . . . nRF52_unpower_debug_and_system_regions
2018-Dec-06 08:08:54  . . nRF52_disconnect_from_emu:    JLink:  TDE5D740 000:976
2018-Dec-06 08:08:54  . . nRF52_disconnect_from_emu:    JLink:  JLINK_Close()

any idea how to make that work?

The same setup works using an nrf52840 dongle

Programming a particle user firmware or your own experiments with nrf?

I’m trying to set up a debugging environment, the same Error occurs using JLinkExe directly

Here is what I responded with on the associated ticket that @locomuco opened:

We don't have any official support for the Segger J-Link at this time. We will be adding support for the Particle Debugger (CMSIS-DAP) in the future, but we don't have any instructions for or experience with the J-Link.

Hi there,

looking at the schematics, it should not be a problem to connect with JLink, it’s basically a copy of the nrf52840 reference design. Is it possible, to check internally, if JTAG/SWD is supposed to work in general with these first prototype batch?

Just trying to figure out what’s the problem, since I spent already quite some time in debugging that…

Thanks

Matthias

Hi there,

it works fine with the Base JLink programmer, but not with the EDU version, solved for me…

Thanks anyways,

Matthias

Hi,

Can you explain how do you got this working?

I want to use SEGGER studio or similar in order to program Particle Boron, in the same way I work with Nordic Semiconductor nRF52840 Development Kit.

Thank you,

Manuel Montenegro