I’m looking to level up my use of the Xiao BLE Sense and program it using nRF Connect instead of the Arduino IDE. I can’t seem to get the initial setup going though, and I’m unsure if it’s a Xiao issue, a SEGGER issue, or something else, so I’m posting here in hope that someone might be able to direct me!
I’m using a SEGGER J-Link EDU Mini, which has a nine pin debug that I have going to a breakout board from Treedix to deal with the pitch change. The Treedix board has the ten pins of the SEGGER connector detailed here: https://wiki.segger.com/9-pin_JTAG/SWD_connector
The Xiao Expansion Board has eight pins along the bottom, and the top four appear to be the ones wired up to the pogo pins on the bottom of the XIAO BLE Sense (though I couldn’t find this confirmed anywhere, it appears that the bottom four pins are a grove connector or something?). the pins are GND, 3V3, SWDIO, SWCLK. I have these wired up to the corresponding SEGGER breakout board pins of GND, VCC, SWIO, CLK.
I execute Jlink Commander (JLinkExe
) to connect to the J-Link EDU Mini. It indicates that my VTref=3.299V, which suggests that it is at least reading the reference voltage of the BLE Sense.
I type connect
, then select the board as a Nordic Semi NRF52840_xxAA Corex-M2 single core board with 1028 KB of flash. I’m making a big assumption that this is the right one.
I set the target interface to SWD, and leave the connection speed at 4000 kHz. The connection fails (output from commander below).
/opt/SEGGER/JLink$ JLinkExe
SEGGER J-Link Commander V7.94b (Compiled Dec 13 2023 17:05:47)
DLL version V7.94b, compiled Dec 13 2023 17:05:24
Connecting to J-Link via USB...O.K.
Firmware: J-Link EDU Mini V1 compiled Dec 13 2023 14:36:33
Hardware version: V1.00
J-Link uptime (since boot): 0d 01h 00m 36s
S/N: 801051069
License(s): FlashBP, GDB
USB speed mode: Full speed (12 MBit/s)
VTref=3.299V
Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: CORTEX-M4
Type '?' for selection dialog
Device>?
Please specify target interface:
J) JTAG (Default)
S) SWD
T) cJTAG
TIF>S
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "NRF52840_XXAA" selected.
Connecting to target via SWD
InitTarget() start
InitTarget() end - Took 103ms
Failed to attach to CPU. Trying connect under reset.
InitTarget() start
InitTarget() end - Took 108ms
Cannot connect to target.
I also tried opening visual studio code with the nRF Connect extensions installed. I see the device under my “Connected Devices” tab in nRF Connect, but when I click on the little microprocessor to see some details of the device I get an error, and the output terminal says nothing useful for me (below):
[17:33:28] nrfutil-device --json reset --serial-number 000801051069
Suggestions on where to go next in debugging this? I’m a software person, so please feel free to explain it like I’m five