I did find, however, that the ST-Link v2 programmer on my F411RE Nucleo board always works 100%. This ST-Link programmer cannot, however, program STM8 devices because of the missing SWIM interface. In July of 2016, I also started playing with the cheap STM8 dev boards and needed a SWIM programmer. I was able to successfully built one using a BP (DIY ST-Link SWIM programmer for STM8S?).
I decided to revisit the DIY ST-Link programmer to get both SWIM and SWD working. Here is my crude attempt at a schematic:
and a stripboard layout:
and the bill of materials:
Code: Select all
Item Value C1 0.1u J1 SWIM J2 SWD LED1 Green LED2 Red R1 4k7 R2 4k7 R7 220 R8 220 R9 220 R10 680 R19 510 R20 510 U1 STM32F103BP VD3 5V1 VD4 5V1 VD6 5V1 VD7 5V1
Yes, it is cheaper to buy a cheap ST-Link clone from China, but I could not wait another 2 months
Hopefully, someone will find this useful, and to OSX user I can strongly recommend getting/building an ST-Link programmer, which in my experience, always works, no matter the mood of your OSX device