Spark Logic

DIY ST-Link SWIM programmer for STM8S?

STM32F103C8T6 LQFP48 Pinout

Hello everyone,

A while back I ordered a few “STM8S103F3P6STM8S103F3P6Microcontrollers and processors…M8S? Kenjutsu Mon Feb 29, 2016 9:26 am Hello everyone, A while back I ordered a few “ STM8S103F3P6 Minimum System Development Board”s with a clone ST-Link programmer. The ST-Link…View in hardware catalog Minimum System Development Board”s with a clone ST-LINKST-LINKModules, instruments and finished devices…ot add the serial usb device… suspect flashing failed…. Do I need to debrick it with st-link ? (which I don’t have lol) BennehBoy Mon Jan 23, 2017 8:11 pm NM managed to rescue it…View in hardware catalog programmer. The ST-LINKST-LINKModules, instruments and finished devices…ot add the serial usb device… suspect flashing failed…. Do I need to debrick it with st-link ? (which I don’t have lol) BennehBoy Mon Jan 23, 2017 8:11 pm NM managed to rescue it…View in hardware catalog programmer was DOA, and now I can not program the STM8SSTM8SMicrocontrollers and processors…id about usb capabilities as well – you may see some non-USB capable (per datasheet) STM8s used in USB applications natively. or UID on parts not specified for UID…. obviously, th…View in hardware catalog boards. Instead of buying a new clone (and waiting nearly 2 months for it to arrive), I was wondering if I can build my own ST-LINKST-LINKModules, instruments and finished devices…ot add the serial usb device… suspect flashing failed…. Do I need to debrick it with st-link ? (which I don’t have lol) BennehBoy Mon Jan 23, 2017 8:11 pm NM managed to rescue it…View in hardware catalog clone using a STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog Blue PillBlue PillDevelopment and computing boards…as become my new favorite board. I am calling it “blue pad” and it is kind of super “ blue pill ”. Pito Thu Jul 27, 2017 8:53 pm [victor_pv – Thu Jul 27, 2017 3:58 pm] – Just for…View in hardware catalog board?

Where should I start looking?

Thank you!

Replies16

Mon Feb 29, 2016 1:30 pm

I was wondering if I can build my own ST-LINKST-LINKModules, instruments and finished devices…ot add the serial usb device… suspect flashing failed…. Do I need to debrick it with st-link ? (which I don’t have lol) BennehBoy Mon Jan 23, 2017 8:11 pm NM managed to rescue it…View in hardware catalog clone

I think a solution would be to build out a BMP which can provide the ST-Link functionality.

Ray

Mon Feb 29, 2016 1:43 pm

You may be able to reflash the dead STM adapter too, if you solder wires to the four solder pads on the board, you should be able to re-flash, but of course you will need a working ST-LINKST-LINKModules, instruments and finished devices…ot add the serial usb device… suspect flashing failed…. Do I need to debrick it with st-link ? (which I don’t have lol) BennehBoy Mon Jan 23, 2017 8:11 pm NM managed to rescue it…View in hardware catalog or BMP to do this.

Mon Feb 29, 2016 9:16 pm

If you are very good at soldering, there is nothing to stop you connecting a USB to serial adaptor to the dead STlink, and its possible that it is blank and just needs to be flashed.

I received a “CC Debugger” from an eBay supplier and found it was totally blank. Fortunately I knew someone with another one of these and we managed to flash my CC Debugger using his CC debugger.

So this sort of thing definitely happens.

Mon Feb 29, 2016 11:10 pm

I have done this in the past, I think the device in question is in my office, ‘cos I can’t find it here. I took a couple of pictures at the time, see below.

https://goo.gl/photos/bHJvb6caAPjTQW318

Image

If I had it to hand, I’d tell you which pins were which, but you can probably figure it out quite easily with a multimeter.

Tue Mar 01, 2016 10:13 am

The BMP has a complete emulation of a STlinkv2?
Because STM8STM8Microcontrollers and processors…with broken reset button and a nasty STLink clone that works with STM32 but not with STM8 . I suspected that something was wrong with wires until I got another STLink (Baite) that…View in hardware catalog uses SWIM instead STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog uses SWD. STlinkv2 clones have two different ports, one SWIM and the other SWD.

Tue Mar 01, 2016 12:09 pm

Thank you for all the replies.

My progress so far:
– downloaded and flashed the blackmagic.bin file in bmp_j66_coreboard_20150524.zip to a Blue PillBlue PillDevelopment and computing boards…as become my new favorite board. I am calling it “blue pad” and it is kind of super “ blue pill ”. Pito Thu Jul 27, 2017 8:53 pm [victor_pv – Thu Jul 27, 2017 3:58 pm] – Just for…View in hardware catalog
– connect the ST-LINKST-LINKModules, instruments and finished devices…ot add the serial usb device… suspect flashing failed…. Do I need to debrick it with st-link ? (which I don’t have lol) BennehBoy Mon Jan 23, 2017 8:11 pm NM managed to rescue it…View in hardware catalog clone to the BMP
– run dfu-util -l and get: Found Runtime: [1d50:6018] ver=0100, devnum=9, cfg=1, intf=4, alt=0, name=”Black Magic Firmware Upgrade (JC66CoreBoard)”, serial=”B6CBAEDB”
– run arm-none-eabi-gdb with target extended-remote /dev/cu.usbmodemB6CBAED1, followed by monitor swdp_scan and get

Target voltage: Not Implemented!
Available Targets:
No. Att Driver
1      STM32F1 medium density

Tue Mar 01, 2016 8:08 pm

Kenjutsu wrote:Thank you for all the replies.

My progress so far:
– downloaded and flashed the blackmagic.bin file in bmp_j66_coreboard_20150524.zip to a Blue PillBlue PillDevelopment and computing boards…as become my new favorite board. I am calling it “blue pad” and it is kind of super “ blue pill ”. Pito Thu Jul 27, 2017 8:53 pm [victor_pv – Thu Jul 27, 2017 3:58 pm] – Just for…View in hardware catalog
– connect the ST-LINKST-LINKModules, instruments and finished devices…ot add the serial usb device… suspect flashing failed…. Do I need to debrick it with st-link ? (which I don’t have lol) BennehBoy Mon Jan 23, 2017 8:11 pm NM managed to rescue it…View in hardware catalog clone to the BMP
– run dfu-util -l and get: Found Runtime: [1d50:6018] ver=0100, devnum=9, cfg=1, intf=4, alt=0, name=”Black Magic Firmware Upgrade (JC66CoreBoard)”, serial=”B6CBAEDB”
– run arm-none-eabi-gdb with target extended-remote /dev/cu.usbmodemB6CBAED1, followed by monitor swdp_scan and get

Target voltage: Not Implemented!
Available Targets:
No. Att Driver
1      STM32F1 medium density

Tue Mar 01, 2016 8:33 pm

AFIK you can ignore the target voltage warning. Its just that its not implemented in that BMP code.

It looks like the BMP is seeing the STLink board.

Wed Mar 02, 2016 8:06 am

I connected another Blue PillBlue PillDevelopment and computing boards…as become my new favorite board. I am calling it “blue pad” and it is kind of super “ blue pill ”. Pito Thu Jul 27, 2017 8:53 pm [victor_pv – Thu Jul 27, 2017 3:58 pm] – Just for…View in hardware catalog to my BMP and I can attach to it via gdb. I seems as if my clone STLink is dead. The power led also do not turn on when power is applied. I guess I will have to buy another clone from eBay :(

Wed Mar 02, 2016 10:56 am

The Blue PillBlue PillDevelopment and computing boards…as become my new favorite board. I am calling it “blue pad” and it is kind of super “ blue pill ”. Pito Thu Jul 27, 2017 8:53 pm [victor_pv – Thu Jul 27, 2017 3:58 pm] – Just for…View in hardware catalog will work as a STLink, you just need to flash the STLink firmware to it.

There isn’t any special hardware on those STLink dongles.

I managed to flash the bootloader to one of those dongles and I think it worked fine, albeit they are of limited use, as they have hardly any gpio connections available.

Wed Mar 02, 2016 1:28 pm

Thanks to this great post by Roger, Arduino on the nRF51822 Bluetooth Low Energy microcontroller, I flashed one of my MapleMapleDevelopment and computing boards…expensive short of buying in bulk. many resort to usb-serial converters. today comes leaflabs maple , stm32duino it is ‘disruptive’ in a similar light, user customizable usb is no…View in hardware catalog Minis to a BMP, and tried to flash the STLink clone again, but stil no luck. The plus side is that I now have a fully working BMP running on a Maple MiniMaple MiniDevelopment and computing boards…8MHz petertumler Thu Sep 24, 2015 10:58 am Hi, I’m trying to underclock a STM32F103 ( Maple Mini ) to 48MHz (for energy efficiency reasons). According to the datasheet .. The full…View in hardware catalog ;)

Wed Mar 09, 2016 6:21 pm

I wasn’t ready to give up just yet, so after some Google-Fu I found this Russian site: http://bovs.org/post/107/programmator-o … m8-i-stm32. I used one of my Blue PillBlue PillDevelopment and computing boards…as become my new favorite board. I am calling it “blue pad” and it is kind of super “ blue pill ”. Pito Thu Jul 27, 2017 8:53 pm [victor_pv – Thu Jul 27, 2017 3:58 pm] – Just for…View in hardware catalog boards and wired up only what is needed to get SWIM going for the STM8SSTM8SMicrocontrollers and processors…id about usb capabilities as well – you may see some non-USB capable (per datasheet) STM8s used in USB applications natively. or UID on parts not specified for UID…. obviously, th…View in hardware catalog , and using stm8flash (https://github.com/vdudouyt/stm8flash), I got my 4 STM8SSTM8SMicrocontrollers and processors…id about usb capabilities as well – you may see some non-USB capable (per datasheet) STM8s used in USB applications natively. or UID on parts not specified for UID…. obviously, th…View in hardware catalog board flashing their green LEDs 8-)

Wed Mar 09, 2016 7:39 pm

Good stuff!

That Russian site is an interesting read. (English Translation)

Thu Mar 10, 2016 10:06 am

The Swim line seems to be controlled by pins PB7,PB8,PB9,PB10 and PB11
The Swim_RST is controlled by PB5 and PB6.
To me seems a lot of pins. I wonder why.

@Kenjutsu
you wired only these pins, with resistors R7,R8,R10,R17,R18 and two zeners VD6 and VD7?

Thu Mar 10, 2016 1:48 pm

Here is what I connected:
  • R1, R2 and C1 to PA0
    R19 to LED1, LED2 to R20 for U1_BL_TX
    R8 to PB5 & PB6 for SWIM_RST
    PB7 to PB9 to PB10 to R7 for SWIM to R10 to 3V3
    PB8 to PB11 to SWIM

;)

Sat Jul 09, 2016 6:37 pm

I just made a guide (from zero to blinky STM8STM8Microcontrollers and processors…with broken reset button and a nasty STLink clone that works with STM32 but not with STM8 . I suspected that something was wrong with wires until I got another STLink (Baite) that…View in hardware catalog ) based on this post and the original russian blog – http://www.stm32duino.com/viewtopic.php?f=35&t=1233

Including a minimal schematic (without leds) of the programmer board with STM32F103C8STM32F103C8Microcontrollers and processors…017 8:28 am I am trying to get Phono’s library working on a MCP2551 and a blue pill ( STM32F103C8 ), I have it connected to a active CANBUS, and I have successfully received and s…View in hardware catalog minimum development board.

Post a reply

Optional · up to 10 MiB