Hardware Debugging Xiao BLE Sense with J-Link and Expansion Board

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 :slight_smile:

Have you tried Ozone?

It is a free GUI application by Segger and it provides more information about the process.

Not yet, I installed it but just having some troubles seeing the forest for the trees (new to hardware debugging and SEGGER seems to have a ton of tools, then Nordic semi does too, not always sure where to look next).

I’ll give it a wing though!

Hi there,
I have several threads on here about it with pictures, Here is my Screen shots what yours should look like. I don’t think it’s connected correctly. Almost but not quite, close though. (i’m using a jlink) but it reply’s the same.
I use both the NRF connect is GREAT! the Programmer will save your bacon if you get really bad a coding one day. :wink:
here’s the stuff.



follow the arrows and pick the device you have.

Then you can read the chip. (it identifies it in upper right corner)

HTH
GL :slight_smile: PJ :v:

ps. if you are going to do any BLE stuff grab a $10 Nordic Dongle, and if your going to dive head long into the power consumption , battery management with code, The PPK2 is a must have but worth it. Go read some of the threads about it makes a nice toolset ALL with Nrf Connect.

Actually @PJ_Glasso your numerous posts here is one of the reasons I decided to go on this part of the journey with the Xiao hardware! And I do have a handful of the nordic BLE adapters as they seem to be much better than the other PC hardware solutions (or at least much more straight forward to use when pairing to the nRF remote chips).

I went back and started to eliminate and replace components. It appears that my horrible soldering skills are the issue, sadly not on the J-Link connector but on the Xiao itself. I hope the next expansion board they come out with has the side castellated pins so a naked BLE Sense (or similar) can just be slotted in! If it’s good enough for the seeeduino engineers, consider passing that on to the rest of us :smiley:

Now that all of the pogo pins on the microcontroller board are actually making contact with the expansion board it’s time to figure out how to do something interesting…

1 Like

Ha HA,
Good Stuff… :+1: I’m in that “SOCKET” line too. Yes even 3d Printed one on here.
It’s good hardware with Meh’ software support but lots of smart folks on here to help along the way.
GL :slight_smile: PJ :v: and Enjoy learning.

Ok, ozone is the bomb for debugging, love it! What a well designed tool…

Connecting ...
 - Connecting via USB to probe/ programmer device 0
 - Probe/ Programmer firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46
 - Probe/ Programmer S/N: -1
 - Device "NRF52840_XXAA" selected.
 - Target interface speed: 4000 kHz (Fixed)
 - VTarget = 3.325V
 - InitTarget() start
 - InitTarget() end - Took 5.59ms
 - RESET (pin 15) high, but should be low. Please check target hardware.
 - Failed to attach to CPU. Trying connect under reset.
 - RESET (pin 15) high, but should be low. Please check target hardware.
 - RESET (pin 15) high, but should be low. Please check target hardware.
 - RESET (pin 15) high, but should be low. Please check target hardware.
 - RESET (pin 15) high, but should be low. Please check target hardware.
 - RESET (pin 15) high, but should be low. Please check target hardware.
 - Connect fallback: Reset via Reset pin & Connect.
 - RESET (pin 15) high, but should be low. Please check target hardware.
 - InitTarget() start
 - InitTarget() end - Took 6.43ms
 - RESET (pin 15) high, but should be low. Please check target hardware.
 - ERROR: Failed to connect.
Could not establish a connection to target.

Did you launch the Jlink software?


Typical message if not…!
HTH
GL :slight_smile: PJ


which one

The commander


first…
type connect

the error i posted first is output of commander

now open programmer nrf connect , it will see the device and show map
i’m updating now, takes a few minutes…
:smile: :v: enter on red arrows

Looks like you got wrong target or board selected, try CORTEX=M4

?

same error
I lose reset pad from board :cry:


you get it hooked up like this or what?

may be i have connection issue. I have disconnected run it without connecting same error shpw without board

Yikes, :flushed:
Yea , has to be connected correctly forsure…LOL
You have the adapter board?
the connection diagram is on here somewhere?



Printed the Base, so it wasn’t laying on the traces


hth
GL :smile: PJ


connected???

nrf connected showing some errors