As I work through the design for my current project (likely using an STM32F4), it seems obvious that I'm going to want some way to actually do in-circuit programming and debugging of the target. To that end, the "standard" way of connecting a recent ST-Link (v3) device seems to be via an STDC14 connector.
While the pin-out and physical part for this connector is quite easy to come by, what I have not yet found are actual guidelines for how to most appropriately integrate this into your actual target device.
Thus far, my strategy has been to find one of STM's development boards that actually has an STDC14 connector (many don't, but some do), and see how they've managed to wire it in. Looking at the schematics for the Nucleo64 STM32G4, for example, its mostly just wired to the obvious pins. (Along with ESD protection on most of the lines, an in-line resistor on JTDI, and some notes about SWDIO/SWCLK routing.)
In any case, does anyone know of good documents and/or schematics that contain the "best practices" guidance for how to integrate an STDC14 connector?
I just put SWDIO,SWCLK,Reset,Vcc and ground on a connector, usually just a SIL pinheader
I just put SWDIO,SWCLK,Reset,Vcc and ground on a connector, usually just a SIL pinheader
I'm still adding SWO. And I make a separate RX/TX/GND connector for USART0, which I use as a console.
I also put on the SWO everytime if possible. But its not mandatory (if you really need that pin).
It should always be the mini cortex 10 pin header, for a single ARM uC.
If you intend to have a chain of uC, then you need the JTAG. This can also be had in 10 mini cortex header.
Be aware that ST-LINK ( all versions) dont support JTAG chains. Only J-ink does.
If no intention of chain, dont use JTAG over SWD.
No need for ESD, just dont hotplug it...Pullup on SWO and NRST, pull down on Boot0. direct connection SWDIO and SWDCLK. That's it...
ESD is for really big boards with long traces, they recommend putting it for legal/liability reasons in case you are a moron who does not know basics.
In reality, not many people in the real world put ESD on their debugging/flashing lines.
Good luck!
I also put on the SWO everytime if possible. But its not mandatory (if you really need that pin).
I output SWO so that I can remotely see the output to the console. I use the CodeGrip programmer-it allows you to perform wireless debugging and monitoring SWO via WiFi. This is very convenient, there is no need to be in an inconvenient and aggressive environment of an industrial enterprise, you can connect the programmer and stay in the operator's room.
It should always be the mini cortex 10 pin header, for a single ARM uC.
It takes up a lot of space on the board. Simple pins are much more compact.
Whatever fits with st-link v3 out of the box.
I aint THAT space constrained.
Whatever fits with st-link v3 out of the box.
I aint THAT space constrained.
You probably haven't squatted with a notbook and ST-Link v3 near a hot, stinking, and rumbling machine - for you, remote debugging doesn't matter.
It takes up a lot of space on the board. Simple pins are much more compact.
Standard Cortex-M debug connector (5x2 0.05" spacing) is the same area as 3 pins of 0.1" connector. Just don't use shrouded connector. Shroud takes most of the space.
Whatever fits with st-link v3 out of the box.
I aint THAT space constrained.
You probably haven't squatted with a notbook and ST-Link v3 near a hot, stinking, and rumbling machine - for you, remote debugging doesn't matter.
I have not.
But I like that method, sounds interrestint for future projects.
What IDE/ what debugger/ what processor?
Right now I have all free software or inexpensive debuggers... ST-LINK V3 mini is 20$
You probably haven't squatted with a notbook and ST-Link v3 near a hot, stinking, and rumbling machine - for you, remote debugging doesn't matter.
I have not.
You're lucky. And I have to invent systems for managing industrial equipment and often perform on-site debugging.
What IDE/ what debugger/ what processor?
I use mikroPascal compiler and debugger, CodeGrip programmer, STM32F107VE processor.
Right now I have all free software or inexpensive debuggers... ST-LINK V3 mini is 20$
My kit is more expensive... Compiler $299, programmer $99 + WiFi license $100. Total: $498.
Standard Cortex-M debug connector (5x2 0.05" spacing) is the same area as 3 pins of 0.1" connector. Just don't use shrouded connector. Shroud takes most of the space.
Are these connectors still that expensive?
Last time I bought them four years ago they were over $1 a piece.
Are these connectors still that expensive?
Last time I bought them four years ago they were over $1 a piece.
Depends on whether you are ok buying direct from China. Here is the first result when searching for "2x5 1.27mm 100pcs" -
https://www.aliexpress.com/item/32795241952.html ($3.10 + $4.72 shipping to US). 8 cents/piece is pretty cheap.
"Reputable" distributors always charge outrageous amounts of money for trivial connectors. So I'm not even considering them anymore.
Yes that was for the company I worked for back then.
In the end we kept the pcb footprint but left the connector out due to price.
Also if you place/remove the connector a lot of times they damage quite quickly.
Company bought (custom order) a few fast debug/program adapters. Those are milled from POM/Delrin, contain those gold probe contacts and a few fastclamps to clamp the board to the probe contacts.
If you ever make something for yourself over 50 pieces I can recommend that.
PS those are TH connectors , we had SMD types, those are way more expensive.
I use that connector on all my boards, I have not had one damaged yet. I'm not sure how much you need to be disconnecting/reconnecting the debugger for it to be damaged.
Plus you really don't need that connector on the mass production boards. Having just the footprint for the bed of nails is a much better idea.
SMD connectors take up more room. And having a though hole connector is much easier for routing in most cases anyway.
Also, they are not all that more expensive. Here is SMT listing for 10 pcs (I can't easily fine one for 100 pcs)
https://www.aliexpress.com/item/32972376101.html ($0.90 + $1.03) - 20 cents/piece. And you can combine shipping, so buying in bulk will be much cheaper.
Oh the same troubles you have with the micro usb connectors, they sometimes snap off the board but that is rare.
TH will be much sturdier than smd. Always keep a stock of the cables they sometimes just make bad contact after hundreds use.
Always keep a stock of the cables they sometimes just make bad contact after hundreds use.
From the same source, I've got corresponding connectors and wire, so I can make my own cables any time I like with any connector polarity and cable length. Again, you get 10x price reduction compared to pre-made cables from typical suppliers. I also sell debuggers that come with those cables, so I need to have that anyway.
Sometimes the pricing of the readily accessible cables makes no sense at all. There are cases when it is cheaper to buy a dev. kit that includes the cable than to buy the cable alone.
That being said, I have not really worn any of the cables I have. And I do quite a bit of switching between the boards.
Having just the footprint for the bed of nails is a much better idea.
I was trying to find a needle-like spring-loaded plug that could somehow be securely attached to the board when plugged in.
In production, this is easy when the board is fixed in bed -just put your fingers down.
But I haven't managed to implement this connection in the fields yet. Something like a magnetic USB I want to use.
I was trying to find a needle-like spring-loaded plug that could somehow be securely attached to the board when plugged in.
You are describing Tag-Connect system.
But I personally see no use for the Tag-Connect It blows up your board space requirements and does not really add anything.
For development, I just rather plug in a real connector. For production you will use a bed of nails. Or if you are doing manual programming, just hold the through hole connector on the holes.
I use Tag-connect for everything I make. I use the "no legs" version, using SWD and SWO also.
Compared to (in this case a 2x6 pin 0.05" header, the space saving is significant)
For prototyping, there is a small "lock" you push on the pins on the back of the PCB, this will keep the TAG connect probe for weeks. I also use it for programming finished boards (if low(er) quantities).
But if you compare it to the though hole 2x5 standard connector, then it is the same area as you 6 pin Tag-Connect. You still have to drill holes for the Tag-Connect, so the advantage of the SMT connector is not really there anyway.
And the connector thing from the Tag-Connect is huge and always gets in a way and applies leverage to the board.
The only times I had to use them is when customer's boards used them, and every time it was a pan in the rear.
I really don't get them.
But if you compare it to the though hole 2x5 standard connector, then it is the same area as you 6 pin Tag-Connect. You still have to drill holes for the Tag-Connect, so the advantage of the SMT connector is not really there anyway.
And the connector thing from the Tag-Connect is huge and always gets in a way and applies leverage to the board.
The only times I had to use them is when customer's boards used them, and every time it was a pan in the rear.
I really don't get them.
We use only SMD whenever possible. The "lock" for "permanently" attaching the probe is super small, 4.5 x 11 mm. No problem for us and we avoid a through hole footprint
But if you compare it to the though hole 2x5 standard connector, then it is the same area as you 6 pin Tag-Connect.
The only advantage is that it is assymmetrical, you can not connect it the wrong way around as you can with the 2x5 idc connector.
But I also prefer the 5x2 idc because there are multiple (cheap) suppliers.
If you don't need the virtual COM port on the STDC14 connector, I would recommend just using the standard ARM 10-pin connector. Fitting the 14-pin connector prevents you from using 10-pin cables. If you use the 10-pin Samtec header FTSH-105-01-L-DV-K-A-TR, you can still plug in the 14-pin cable from the ST Link and use it no problem but also remain compatible with debuggers using the 10-pin standard.
We use only SMD whenever possible. The "lock" for "permanently" attaching the probe is super small, 4.5 x 11 mm. No problem for us and we avoid a through hole footprint
Can you provide more details about what we are looking at?
I see two pins protruding up. Are those the two signal pins? Aren't they too close and will short?
I see a hole with a pin pushed (from the bottom). What is that about. Looks interesting how it is holding the board.
Thanks!