Difference between revisions of "DIY STM32 Programmer (ST-Link/V2-1)"
Line 1: | Line 1: | ||
− | [[Category:STM32]][[Category:STM32 Projects]][[Category: | + | [[Category:STM32]][[Category:STM32 Projects]][[Category:KiCAD]]{{metadesc|Home made ST-Link V2.1}} |
[[File:STLink.jpg|thumb|Original ST-Link]] | [[File:STLink.jpg|thumb|Original ST-Link]] | ||
[[ST-Link]] devices are almost essential when developing software for the [[STM32]] [[MCU]]s. They are relatively cheap and easily available. | [[ST-Link]] devices are almost essential when developing software for the [[STM32]] [[MCU]]s. They are relatively cheap and easily available. |
Revision as of 02:45, 22 July 2021
ST-Link devices are almost essential when developing software for the STM32 MCUs. They are relatively cheap and easily available.
They roughly fall into two different categories. ST themselves make a number of them and they all work quite well.
One thing that annoys me with the original ST-Link devices is that the programming header is unlabelled. This essentially mean that every time I use it I have to Google for the actual pinout.
Also, the ones I've got (the one in the photo to the right) are ST-Link/V2 devices.
There are also a lot of Chinese clones available and while they have some limitations they also work quite well.
Unfortunately these devices are also ST-Link/V2 devices, and they do not have the SWO pin on the header, so any debug trace is impossible. For flashing and normal debugging they work fine though.
In short, the ST-Link/V2.1 devices offer a few extra features:
- Serial Wire Trace (SWO)
- Virtual serial port
- Mass storage
All features that, while not absolutely essential, does come quite handy.
Another reason for creating my own "programmer" is that I can experiment with using a GigaDevice GD32F103, which are much easier to source at the moment.
Original ST-Link V2.1
The schematic of the original ST-Link is readily available
Schematics
Based on ST's original schematics, creating a version using only parts from JLCPCB's parts library was easy (and much nicer if I shall say so myself).
One thing I left out was the serial resistors of the programming header. This might very well come back and bite me in the ass but space is going to be at a premium.
PCB
The final rev. a layout looks like this:
The KiCAD 3D model:
Revision a
A quick order to JLCPCB and within a week I had my first "samples".
I had to solder the USB connector on by hand.