nerwalt[m] has quit [Quit: Idle timeout reached: 172800s]
firefrommoonligh has quit [Quit: Idle timeout reached: 172800s]
k3ma[m] has quit [Quit: Idle timeout reached: 172800s]
Ralith[m] has joined #rust-embedded
<Ralith[m]>
I'm new to embedded, and trying to understand what equipment I need to debug a RAK4631 (https://store.rakwireless.com/products/rak4631-lpwan-node), which is a module exposing SWD pins with big through hole contacts, and containing a nRF52840, which is a Cortex M4. Will any DAPLink debugger do? They seem to be widely available. How do I best physically connect to those contacts?
Ralith[m] is now known as Ralith
Ralith has quit [Quit: Reconnecting]
Ralith has joined #rust-embedded
i509vcb[m] has joined #rust-embedded
<i509vcb[m]>
Assuming the swd pins are via the board to board connector and your probe and target is 3.3V capable (or the prove can track SWD voltage) its probably just a header on the carrier board
<Ralith>
no, they're some separate weird big through-hole thing; see the photos at the link
<i509vcb[m]>
Oh okay
<i509vcb[m]>
Yeah solder on a header then, probably 2.54mm or something smaller (datasheet should say)
<Ralith>
it doesn't seem to, and eyeballing the dimensions it looks a lot wider spaced than that
<Ralith>
seems like it's designed for some specific type of probe or clip or something
<jonored[m]>
looking at the u.fl surface-mount antenna connector on it as a dimension reference (but by memory) that does look plausible as 2.54 that's a bit close for comfort to corner mounting holes.
<jonored[m]>
and looking it up u.fl is 2mm diameter, so that looks about right.
<Ralith>
alright, seems plausible; working under that assumption, is there a non-solder probe of some sort that's often used? I might want to program a handful of these and permanently installing headers seems labor-intensive and awkward, and might make packaging harder besides.
<jonored[m]>
pogopins are a usual approach, but you might not find a connected-up one. I like the little spring hook clips for less effort but more fiddly attachment.
<Ralith>
the kinda thing cheap multimeters come with?
<jonored[m]>
"test hook clips" brings up some of what I mean. The ones with a plunger you press on the back to slide a hook out the tip, not alligator clips.
<Ralith>
right, thanks!
<jonored[m]>
but I'm also pretty sure you can get pogo pins with a head large enough to not fall through those through-hole pads, which would be slower to make the jig the first time and then faster if you end up doing a lot of them. Soldering headers also isn't actually very labor-intensive, either, and might save enough time fiddling to be worth it. press-fit headers also exist and might fit but I haven't used those personally.
<Ralith>
luckily everything's cheap enough that I can experiment and see what works, seems like.
<Ralith>
Is a generic DAPLink the right tool to speak SWD with?
sourcebox[m] has quit [Quit: Idle timeout reached: 172800s]
<LeandroMarceddu[>
You can pretty much buy a cheap RP2040 (like a pico) and use that as a tool
<jonored[m]>
most of that's just handy to have around occasionally anyways. Wouldn't know about the tool, I mostly have been picking chips with a usb phy built in (mostly esp32c3), the m0 stuff I've done had a whole different channel to load binaries.
<Ralith>
the larger ecosystem the RAK4631 fits into does make "just plug it into USB" trivial, but that relies on a bootloader and I'm not sure if it supports real debugging, so it seemed like it might be nice to have lower level tools handy
<Ralith>
some other Rust user of the module commented "developing is 4 times better with a debug probe such as RAKDAP1. Just buy it."
<i509vcb[m]>
I would absolutely suggest buying a debug probe
<Ralith>
yeah, I'm just confused about interoperability on both host and MCU side
<i509vcb[m]>
Well the nrf parts use SWD and a Pico H is $5 and then just some dupont wire is the cheapest I could think of for debug
<Ralith>
I guess probe-rs says it supports DAPLink+SWD, and DAPLink says it supports SWD, so any commodity dongle that runs DAPLink should work?
<i509vcb[m]>
You flash the pico debug firmware onto it
<TomB[m]>
since buying a jlink I've been spoiled I feel like...
<i509vcb[m]>
Respberry Pi does sell a nicer debug probe thats $12
<TomB[m]>
it Just Works 99.99% of the time in one way or another I feel like, but yeah they aren't cheap
<i509vcb[m]>
Of course that's only going to work on 3.3V IO
<i509vcb[m]>
Which is why you need to read the datasheet for the module to make sure it isn't being run in a 1.8V mode from VDDH
<i509vcb[m]>
If it is then you'd need something that can track the target voltage
<Ralith>
nah it's 3.3V
<TomB[m]>
I've heard good things about the st-ilnk, maybe others can comment on it
<TomB[m]>
* on it, don't have one
<i509vcb[m]>
iirc the STLinks are sometimes vendor locked?
<TomB[m]>
ah bummer, yeah $35 for a debug probe seems great
<TomB[m]>
I just ordered an orbtrace, been wanting to try and capture TRACE data without the JTRACE/Lauterbach prices
<TomB[m]>
will report back
<Ralith>
you can get generic DAPLink dongles on Amazon for like $8
<TomB[m]>
honestly a lot of it is the software though... there's parts and parts and parts, and eventually you run into a part that isn't well supported by the open source tools yet...
<Ralith>
that's the beauty of standard protocols
<TomB[m]>
there's nothing standard about how parts are flashed
GrantM11235[m] has joined #rust-embedded
<GrantM11235[m]>
My knockoff stlink v2 works with probe-rs and isn't vendor locked, but its about the same as a generic DAPLink or a pico
<i509vcb[m]>
For something that can track down to 1.8V you could look at the MAX32625 Pico, but you'd need to adapt from the 10-pin connector to dupont wire
<GrantM11235[m]>
I believe the stlink v3 is better, but it is vendor locked
<i509vcb[m]>
Mouser says that maxim debug probe is $17?
<i509vcb[m]>
ADI did give me one of those and its a nice little debug probe.
<i509vcb[m]>
I would shill for the rustyprobe but I don't think those have been sold for a while?
thejpster[m] has quit [Quit: Idle timeout reached: 172800s]
<Ralith>
the store seems to be working fine? probably overkill for my immediate needs though
<i509vcb[m]>
Oh it did come back in stock
<GrantM11235[m]>
You should be fine with any daplink, or a pico, or an stlink v2
<Mathias[m]>
Sorry for nitpicking, DAPLink is the name of a specific firmware project for making debug probes with different MCU using the CMSIS-DAP protocol. DAPLink supports SWD and sometimes JTAG depending to the probes. Some off-brand probes sometimes use the name DAPLink to mean CMSIS-DAP. There are also other probe that support CMSIS-DAP (pico probe, MCU-LINK).
<GrantM11235[m]>
That's true, when I said any daplink, I meant any of those generic probes that supports CMSIS-DAP
<Ralith>
<Mathias[m]> "Sorry for nitpicking, DAPLink is..." <- no, this is very helpful, thanks
<Mathias[m]>
The MAX32625 supports DAPLink and it is very compact. I would also recommend the NXP MCU-LINK (with the something like the Adafruit SWD/JTAG adapter https://www.adafruit.com/product/2094 if you want to connect to a target that does not have the 10-pin debug connector) because it has high-speed USB.
<Ralith>
that would cost more than the rest of this project combined
WoodrowDouglass[ has quit [Quit: Idle timeout reached: 172800s]
AstraKernel[m] has quit [Quit: Idle timeout reached: 172800s]