Are clone ST-LINK/V2 adapters good with SWIM/STM8? - Page 1
Forum section: electronics / general

author: HwAoRrDk
author_rank: Super Contributor
timestamp: August 29, 2022, 12:25:51 pm
content: Does anyone have any experience using the common ST-LINK/V2 clones - either the USB stick form factor, or the full look-alikes - with STM8 SWIM programming? Do they definitely support it and work well?As far as I know, these clones simply use the exact same (pirated) ST firmware image, right? So I would guess they work exactly the same, but you never know...I wanted to buy an official ST ST-LINK/V2, but they're out of stock everywhere right now.(Yes, I'm aware STLINK-V3 is available, but that's for some reason 3x the price, and I'm not sure whether open source tools support it just yet.)

author: smithnerd
author_rank: Regular Contributor
timestamp: August 29, 2022, 01:15:13 pm
content: Doesn't look promising.When connected to an stm8s003f3, stm8flash reports 'SWIM error 0x04' and openocd reports 'Error: Debug adapter doesn't support 'swim' transport'.This is with a red USB stlinkv2 clone, bought from ebay about 6 weeks ago. It has a Geehy stm32 clone. I've not tinkered with its firmware thus far.

author: retiredfeline
author_rank: Frequent Contributor
timestamp: August 29, 2022, 01:41:11 pm
content: I've been using a USB stick V2 clone fine for flashing and debugging STM8 for the last couple of years. From the CLI and from PlatformIO.

author: HwAoRrDk
author_rank: Super Contributor
timestamp: August 29, 2022, 01:59:04 pm
content: Hmm, so pot luck then? Some work, some don't.I wonder whether it's more likely that the 'full' clones (i.e. the look-alikes, not the USB stick ones) support STM8 properly, given that they have the separate SWIM connector and bundled cables for it.Suppose at the very least I could just try ordering one off eBay that specifically claims STM8 support, and then if it doesn't work I should be able to easily get a refund (as "item not as described").

author: retiredfeline
author_rank: Frequent Contributor
timestamp: August 29, 2022, 02:05:43 pm
content: My USB stick which looks like the one on the right of your picture, but blue, came with a 4 conductor cable for power, reset and SWIM. One thing to watch out for is that the adaptor can power the STM8 board which you have to take into account.

author: darkspr1te
author_rank: Frequent Contributor
timestamp: August 29, 2022, 02:21:11 pm
content: I Use the green st-link v2 on stm8 no issues with swim via the ST Visual programmer , wont work with STM32 ST-Link tool on clones for some reason.there are mods you can do to enable the stm8 reset pin (pb1) on clones which will enable some st-link apps to program stm8

author: abyrvalg
author_rank: Frequent Contributor
timestamp: August 29, 2022, 03:54:44 pm
content: "Full" (flat white box) clone’s quality looks higher than stick’s in average. I’ve seen sticks with bad connector solder and sticks with pinout shown on the case not matching PCB pinout (there are at least two PCB versions and it looks like wrong cases are used sometimes)

author: HwAoRrDk
author_rank: Super Contributor
timestamp: August 29, 2022, 04:36:14 pm
content: That settles it, USB stick ones seem to be a mixed bag. Guess I'll get the 'full' clone, then.I wonder if genuine ST-LINK/V2 being out of stock everywhere means ST have stopped making it, now that there is the STLINK-V3. And the cloners have started producing the 'full' model to fill a gap in the market?

author: thm_w
author_rank: Super Contributor
timestamp: August 29, 2022, 10:22:56 pm
content: Quote from: HwAoRrDk on August 29, 2022, 04:36:14 pmThey were always producing the "full" model clone, at least for some years. I don't know which was the first though, but 2013 or earlier when clones came out.ST will eventually make more, I think, for people who use it in production and are unwilling to change. Its still active on the site:https://www.st.com/en/development-tools/st-link-v2.html

author: HwAoRrDk
author_rank: Super Contributor
timestamp: September 05, 2022, 05:07:13 pm
content: Got my 'full' clone ST-LINK/V2 today. Opened it up and it's using a Geehy APM32.Wasn't expecting so, but it did indeed arrive with a full ST-branded box and logo on the device. Very cheeky!Recognised straight away with existing ST-LINK drivers, also works no problems with stm8flash. Does not appear to power the target device on the SWIM connector. At least, if I put a meter between VDD and GND pins, I measure 0V, both at idle and when attempting to do a flash read (with no MCU connected).Can't comment on the STM32 SWD/JTAG programming - haven't tried it.

author: true
author_rank: Frequent Contributor
timestamp: September 07, 2022, 03:30:04 am
content: Did you try upgrading firmware on the type A stick clones?I think some of the stick ones may have a 32-bit only firmware on them. All of mine that I've tested work with STM8 fine though. Being china, there could be board variants. I think I've seen two PCB layouts (single LED and dual LED versions) but maybe more exist.Color of the case doesn't matter and doesn't indicate anything. Neither does the logo. (some have ST logo, but sometimes have other logos)

author: HwAoRrDk
author_rank: Super Contributor
timestamp: September 13, 2022, 04:21:16 pm
content: Well, I discovered something wrong with this clone ST-LINK - or rather, one of its accessories - that I hadn't spotted initially.See if you can spot the problem...

author: mon2
author_rank: Frequent Contributor
timestamp: September 13, 2022, 07:23:17 pm
content: Cable harness is wired incorrectly. Nasty. Had cables like from Startech when CD rom players were big $$$. Smoked the unit instantly. Glad we had a high volume turnover with inventory that we were able to send the CD ROM unit back. Startech was yelled at but they really should have paid for the damages. Importers of offshore rebranded widgets.The molex connector, back then was reversed on the 5/12v AT power feeds.

author: HwAoRrDk
author_rank: Super Contributor
timestamp: September 13, 2022, 07:38:40 pm
content: Yup. Connected it up, but then thought "wait, something's not right here, isn't the white wire reset? ...and it's connected to VDD".I don't think anything catastrophic would have happened if I had powered everything up, though.Was able to simply re-pin the offending connector.