SparkFun Forums 

Where electronics enthusiasts find answers.

Everything ARM and LPC
By Daniel Wee
#116020
I have some questions concerning the programming interface for the STM32 MCU. Putting aside the serial bootloader - am I correct to say that the absolute minimum programming (not debugging) requirement would be:-

SWDIO
SWCLK
GND
VDD

with NRST as an option. Is this a correct assumption? All the documentation I could find regarding this mention this as a debugging option and do not explicitly mention that this is sufficient for programming.

Further to this, I would just make an adapter to connect the J-Link's 20-pin JTAG header to connect these pins to program it in this reduced mode? Is there a schematic of the adapter, assuming that some other connections need to be made such as grounding some of the JTAG pins and so on?

My objective here is to have a minimum pin-count interface (excluding a serial bootloader) and using a J-Link JTAG to do the job (thus requiring an adapter.)

Any help in this is much appreciated.

Daniel
By TheDirty
#116109
Speaking only with experience with the LPC1xxxx SWD programming, reset is not an option. 3.3V is sometimes an option depending on your programmer, but generally you need 5 pins. 3.3V, GND, SWDIO, SWCLK, and RESET.

Search SWD connector for the standard 10 pin 1.27mm SWD connector. I've tried using a 5 pin inline connector and for some reason it's not working for me, but if I green wire in the 10pin connector it works. I haven't figured out why, yet.
By TheDirty
#116126
Well, I only use 5 wires, but with the 10pin connector it always works for me, but they are pretty expensive. A 5 pin 0.1" header takes about the same space, but is cheaper. I only tried the 5 pin connector on one board, but I could not get it working for some reason. It must be something I'm doing, but I checked over the wiring over and over and couldn't figure it out. If I just soldered wires onto the same board directly to a 10pin connector it worked fine.

Again, this is with the LPC1xxx's.
By rmteo1
#117020
You need just 4 connections to program and/or debug.
QUARTER.jpg
You do not have the required permissions to view the files attached to this post.