Author Topic: STLINK V1 / V2 difference - when there is need for upgrade/repair  (Read 25646 times)

0 Members and 2 Guests are viewing this topic.

Offline YansiTopic starter

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Hi, I just want to share experience with STLINK/V1 reapir.  If you fry your STLINK, there is a possibility to get it repaired. One way to do it is to replace the chip by another one, by cannibalizing a discovery board. But wait, there is a catch. STLINK V1 and V2 differs in hardware. Luckily, not much. There is some work to be done, so one can use STLINK V2 firmware for STLINK V1 hardware. Today, I have repaired old STLINK V1 and I'd like to share my experience with you:

After removing the chip and soldering the good one, you might want  to download a code to it. The unpopulated conector near the MCU has all pins needed for that. You don't need to solder wires to the tiny fine legs. If you have already soldered pre-loaded (cannibalized) chip, just follow the next steps:
STLINKV2 has got some resistor for version (or something) identification. These resitors (there are actually two) weren't used on STLINK1. You must solder one resitor, 10K from pin 2 (PC13) to ground. Without this resistor, it absolutely denies to work.
Nex, you must add 100ohm resistor between pin 25 (PB12) and 27 (PB14). STLINKV1 hasn't got any. Without this resistor, it also does not work. It looks like, without this resistor (PB12 left open) it fails to read data from SWDIO line. SWDIO just does not switch to input state and the two pins (STLINK and target MCU) begin fight. Fortunately, there is a protection resistor soldered on STLINK, so nothing will make smoke (I hope).
Third difference is the RESET pin connection. On STLINKV1, reset pin was 19 (PB1).  STLINK V2 has reset on pin 18 (PB0). Don't forget that, otherwise "connect under reset" will not work. There is an easy solution, no need to peel and wire any traces on the PCB - just use pin 3 (TRST) instead of 15 (RESET) on the 20pin header connector.

Note: If you repair a board, which has failed by overvoltage, please check and measure ALL protection circuitry near the 20pin header connector, though the parts (especially) resistors don't look fucked, they might be open. I had to change four of them, only one was visibly charred.

Have a nice day, I hope, it will help someone someday, bcs I've lost half a day on this sucker  >:D

One photo of the botch repair:
 

Online chickenHeadKnob

  • Super Contributor
  • ***
  • Posts: 1055
  • Country: ca
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #1 on: November 18, 2014, 08:31:40 am »
o
Have a nice day, I hope, it will help someone someday, bcs I've lost half a day on this sucker  >:D



I don't see the point in repairing an old st-link1. You can buy a new nucleo dev board for about 10-12 $ and solder an external header to the holes provided. You can even seperate from the target board if you want the jtag alone.
 

Online Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #2 on: November 18, 2014, 09:27:24 am »
Sure and you can buy a new STLINK v2 for $20 as well. But that is not the point is it? Or nobody would repair their old electronics anymore.
It is a hobby and why throw something away that can be repaired.
Nice job.
 

Online chickenHeadKnob

  • Super Contributor
  • ***
  • Posts: 1055
  • Country: ca
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #3 on: November 18, 2014, 09:50:49 am »
Sure and you can buy a new STLINK v2 for $20 as well. But that is not the point is it? Or nobody would repair their old electronics anymore.
It is a hobby and why throw something away that can be repaired.
Nice job.

He canabalized! a working stlink2 to fix a borken stlink1.   .......  :palm:
 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #4 on: November 18, 2014, 10:25:15 am »
If you have an working STlink/v2, why do you need an Stlink/v1?
 

Offline halexa

  • Regular Contributor
  • *
  • Posts: 156
  • Country: se
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #5 on: November 18, 2014, 10:50:02 am »
And there is no working windows 7 drivers for STLINK V1, which got me to ditch my V1 and buy a new V2.
SoI don't see  the need for a V1 STLINK, functional or broken.
« Last Edit: November 18, 2014, 10:51:35 am by halexa »
 

Offline YansiTopic starter

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #6 on: November 18, 2014, 11:28:15 am »
Sure and you can buy a new STLINK v2 for $20 as well. But that is not the point is it? Or nobody would repair their old electronics anymore.
It is a hobby and why throw something away that can be repaired.
Nice job.

He canabalized! a working stlink2 to fix a borken stlink1.   .......  :palm:

No, I haven't. :palm:  Just search for the STLINK/V2 code on the web.

neslekkim, halexa: Are you both stupid or cannot read? The modification applies for upgrading STLINK/V1 to V2.  And, also wrong, STLINK V1 works @ Win7 fine. I've used that few times at work. No problems whatsoever (Win7 64bit). 

To be exact, why not to use bare board like NUCLEO board as a programmer: The board has NO isolation,  NO enclosure. Thats why I repaired the old STLINK and upgraded it to V2, because it has a box.
 

Offline halexa

  • Regular Contributor
  • *
  • Posts: 156
  • Country: se
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #7 on: November 18, 2014, 11:35:48 am »
Srry I got it wrong, then I understand.
Which driver are you using for the V1 on windows 7 64, I never got mine to work and gave up and bought a V2.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #8 on: November 18, 2014, 11:38:21 am »
Quote
The board has NO isolation

Unless yours is an isolation version of the stlink, it doesn't have isolation either.

ST links are a few dollars each, hardly worth the efforts to fix.

The one that's worthy is the newer Jlink - they support Jscope and RTT.
================================
https://dannyelectronics.wordpress.com/
 

Offline YansiTopic starter

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #9 on: November 18, 2014, 12:50:54 pm »
:palm: (and maybe double) Bare board lying on conductive surface, so much super for using any discovery/nucleo board as a standalone programmer. Just ideal for shorting out something. ISOLATION  packaging around only solves the problem.

I TALK ABOUT ISOLATION WHICH PROVIDES THO PLASTIC BOX AROUND THE BOARD, not isolation between PC and target. Or am I speaking too much chinese?

Next time I might not share any experience, because some people find it useful only for hassling around.



//halexa: I've installed driver package for STLINK/V2, something also installed with STLINK UTILITY. When I will be at work, I will look what driver is loaded for STLINK V1. Maybe on friday I will be there.
 

Offline Brutte

  • Frequent Contributor
  • **
  • Posts: 614
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #10 on: November 18, 2014, 01:28:45 pm »
I TALK ABOUT ISOLATION WHICH PROVIDES THO PLASTIC BOX AROUND THE BOARD, not isolation between PC and target. Or am I speaking too much chinese?
You are talking Chinese. When someone mentions some dongle provides isolation then in 99.9% cases this does not mean a solitude. Nor putting a dongle in a plastic box.

As for upgrading ST-link from V1 to V2 - please continue but considering the low price of ST-link dongles, I would not count on big audience. Personally I scavenged most stm32F103's from my st-links/V1 and these are used with other projects right now.
 

Offline YansiTopic starter

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #11 on: November 18, 2014, 02:42:14 pm »
So ok, I explained that plastic enclosure makes electrical insulation, so please, stop chatting around and keep the topic. If you have not got anything to it, shhhh.
 

Offline Rasz

  • Super Contributor
  • ***
  • Posts: 2616
  • Country: 00
    • My random blog.
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #12 on: November 18, 2014, 04:49:35 pm »
hah, I just opened by irl mailbox and found $3.99 chinese STlink2 clone in there :)
http://www.ebay.com/itm/400784973100

I was going to bodge one using bare IC and protoboard, but couldnt be bothered when I saw clone prices
Who logs in to gdm? Not I, said the duck.
My fireplace is on fire, but in all the wrong places.
 

Offline YansiTopic starter

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #13 on: November 18, 2014, 10:42:52 pm »
Yea, pretty, but this is unlicensed illegal stuff, by the way. STLINK source code (or hex/binary) is not public ware, it is also very strictly kept secret, surprisingly most of ST crew members have absolutely no access to the code/binary.

This decision to repair that crap was simple: Repair and have working unit or wait two months for a chinese version, which is slightly crappy too, because it has absolutely no ESD protection circuitry on the SWD connector. The original STLINK has at least some 5V6 zeners there. (but also lacks ESD protection on USB side)
 

Offline paulie

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #14 on: November 18, 2014, 11:03:25 pm »
Very little you say makes sense. You already had a working unit and instead of simply putting it in a box or shrinkwrap you decided to destroy it and spend many hours transplanting and risk ruining both. There is nothing wrong with the $4 chinese clones. They are 100% compatible. They don't take 2 months to arrive and from a practical sense that ESD line is bullshit.  No protection on the USB? LOL.

I've done stupider things myself in the interest of science but having seen two other virtually duplicate blogs elsewhere on the internet I suspect  this is not likely a serious hobby effort.
 

Offline YansiTopic starter

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #15 on: November 19, 2014, 12:16:35 am »
No, very little you can understand, because:
I didn't destroy any working unit
I didn't destroy the repaired STLINK (took it home from work, I was allowed to keep it)
I've said, if you are curious enough, you can find pirated STLINK firmware on the web. But i will NOT support anyone getting that firmware.  Just took a fresh 32F103C8T6, soldered it there and programmed it.

And shrinkwrap, so fucking awful I'd better repair and modify the old one I brought home, rather than use that awfuly shrinkwrapped board.

And truly, these days chinese packages go to our country for around 2 months. It pisses me really off, because I think this is a problem with customs in our country, not chinese or any logistic/delivery problem. The package sits at customs quite long time.

« Last Edit: November 19, 2014, 12:20:35 am by Yansi »
 

Offline paulie

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #16 on: November 19, 2014, 01:21:09 am »
Hi, I just want to share experience with STLINK/V1 reapir.  If you fry your STLINK, there is a possibility to get it repaired. One way to do it is to replace the chip by another one, by cannibalizing a discovery board.

Actually that is just about the only way to do it.

So now you are saying you downloaded firmware off the internet.  Not likely. Before realizing how protected it was I spent many hours searching and reading stories including the fellow who claimed to have broken the STM encryption. No credible evidence anywhere this has ever been achieved. This is even more ridiculous than the transplant story.

A reasonable course of action would be to order a clone and hobble along with the Discovery until it arrived. Since you avoid revealing you country of origin I assume it's either Antarctica or North Pole. In which case even if it did take 2 months it's unlikely the Discovery would self destruct in that short time. If you are so upset by appearance hide it under the table until the sleek new clone arrives, They are certainly more attractive than those ridiculously clunky STM dongles.
 

Offline YansiTopic starter

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #17 on: November 19, 2014, 01:51:05 am »
I have a binary image of STLINK here on my computer, it is just the file from the man who broke the encryption. Before the file was taken away (it is quite some time, the file was given public). ST makes strict legal steps to keep STLINK firmware as a secret. I think that ST's decision is acceptable, with respect to the price of  stlink and the fact, it works as a full featuring swd debugger partially supporting jtag (i think there is restriction of the jtag chain length just for 1 device only).

There are not much possibilities how can I proof you such file exists. If I reveal the filename (by which you can find it on the web), it puts me at risk, because my relation to ST. I can only check if the file is still somewhere on the web. If not, ... ST successfully removed that as well.
I only imagine how the chinese people made their stlink dongles. Also crack or someone wrote whole new software, just compatible?

My country is some small country in central europe, neighbouring with Germany. It doesn't matter. Last week I received maybe 6 packages from last 2 to 3 months and also one, for which I have had full refund. The postman delivered it on friday, after 3 months minus a week from the payment on ebay. The post here really sucks, trust me.
 

Offline paulie

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #18 on: November 19, 2014, 01:55:30 am »
If I reveal the filename (by which you can find it on the web), it puts me at risk

How did I know you were going to say that? LOL.

Two words: peee... emmmm....
 

Offline YansiTopic starter

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #19 on: November 19, 2014, 01:59:19 am »
Maybe.  But now, i am going to sleep, here is 2:59 AM,  shit... >:D
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #20 on: November 19, 2014, 02:04:55 am »
Quote
Before the file was taken away

Quite a few of them are floating around - it doesn't take much to find them.

But what value does it have, when you can get the stlink v2 for less than a song?
================================
https://dannyelectronics.wordpress.com/
 

Offline paulie

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #21 on: November 19, 2014, 02:12:40 am »
Time to put on the boots. Getting pretty deep, even for dannyf.
 

Offline YansiTopic starter

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #22 on: November 19, 2014, 02:17:49 am »
Hey man... just gone over comments below on "the big crackers blog", visited some russion forum and yep, file still there in all its parade, same as I have.

Now really going to sleep.  :=\ :=\ :=\  3:17 AM here.  |O
 

Offline paulie

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #23 on: November 19, 2014, 02:26:10 am »
For a change of pace try "link" instead of "lame". Just did a search for "the big crackers blog" and nothing about STM but those first two pages sure made me hungry. Mmmmmmm... I'm gonna sign off too to go EAT!
 

Online Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: STLINK V1 / V2 difference - when there is need for upgrade/repair
« Reply #24 on: November 19, 2014, 07:56:04 am »
There is nothing wrong with the $4 chinese clones. They are 100% compatible.
That is what they said about the FTDI clones, you can not know for sure and you would not bet a large amount of money on it that it is 100% compatible. So enjoy while it lasts.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf