Author Topic: Quick hack to get SWO on ST-Link clones  (Read 8601 times)

0 Members and 1 Guest are viewing this topic.

Offline lujji

  • Contributor
  • Posts: 27
  • Country: 00
Quick hack to get SWO on ST-Link clones
« on: September 27, 2016, 05:33:28 am »
I recently bought a cheap ST-Link v2 knockoff. Unfortunately, these things don't have an SWO pin so you can't use trace. ST-Link firmware uses pin 31 for SWO, so all you have to do is scrape off some solder mask and solder a bodge-wire to the connector. If you need more details I documented everything on github.



P.S.: I wouldn't recommend buying these dongles. A Nucleo board (10$) will get you a much more useful programmer with UART on board.
 
The following users thanked this post: Mechatrommer, eliocor, Rasz, thm_w, edavid

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1339
  • Country: dk
Re: Quick hack to get SWO on ST-Link clones
« Reply #1 on: September 27, 2016, 06:02:12 am »
Thanx for that info  :-+ :-+

Any url's to a $10 Nucleo (prefer amazon or *bay)

/Bingo
 

Offline lujji

  • Contributor
  • Posts: 27
  • Country: 00
Re: Quick hack to get SWO on ST-Link clones
« Reply #2 on: September 27, 2016, 06:15:10 am »
I haven't seen Nucleo boards on ebay for a reasonable price. There are plenty on digikey though. I suggest getting one that has ST-Link v2-1 (like this one). There should be RX/TX pins near SWD connector.
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1339
  • Country: dk
Re: Quick hack to get SWO on ST-Link clones
« Reply #3 on: September 27, 2016, 06:28:46 am »
Thnx

But S&H would far exceed the *bay prices.

Bingo.

Ohh one of those resistors on the arm-mcu decides if it's a v1 or v2 st-link , maybe you could fool it to be a v2.1

/Bingo
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 1916
  • Country: gb
« Last Edit: September 27, 2016, 06:52:46 am by stj »
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1339
  • Country: dk
Re: Quick hack to get SWO on ST-Link clones
« Reply #5 on: September 27, 2016, 06:56:37 am »
h
if your really in Denmark then maybe here:

I am in Dk ,and those prices excl VAT & Postage.

Again *bay wins , even though those UK guyzz selling them are prob. buying them @ RS or Farnell and reselling on *bay

/Bingo
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 1916
  • Country: gb
Re: Quick hack to get SWO on ST-Link clones
« Reply #6 on: September 27, 2016, 07:05:56 am »
well if you ordered one,
here is the latest firmware update.  :-+
 
The following users thanked this post: Mechatrommer, eliocor, bingo600

Offline lujji

  • Contributor
  • Posts: 27
  • Country: 00
Re: Quick hack to get SWO on ST-Link clones
« Reply #7 on: September 27, 2016, 07:08:58 am »
Ohh one of those resistors on the arm-mcu decides if it's a v1 or v2 st-link , maybe you could fool it to be a v2.1
You mean board ID resistors? That's a good idea, unfortunately both v2 and v2-1 schematics have the same ID resistors. Out of curiosity I just tried soldering unpopulated 10k resistor on my nucleo with st-link v2-1 and it seems to have no effect.
The problem with Chinese dongles is that they copy the standalone ST-Link programmer (which supports both STM8 and STM32). But standalone programmer can't be converted into J-Link. The ones on Discovery/Nucleo boards can ;)
« Last Edit: September 27, 2016, 07:20:27 am by lujji »
 

Offline chickenHeadKnob

  • Frequent Contributor
  • **
  • Posts: 659
  • Country: ca
Re: Quick hack to get SWO on ST-Link clones
« Reply #8 on: September 28, 2016, 01:34:38 am »
well if you ordered one,
here is the latest firmware update.  :-+

How are you finding the stability of 2.28.16 ?  I just read on Carmine Noviello's website that 2.26.16 has bricked some peoples st_links. His blog entry is confusing and probably has a typo since he writes 2.26.15 and 2.26.16

Link: http://www.carminenoviello.com/2016/02/26/restore-st-link-interface-bad-update-2-26-15-firmware/
 

Offline OZ1LQB

  • Contributor
  • Posts: 29
  • Country: dk
Re: Quick hack to get SWO on ST-Link clones
« Reply #9 on: September 28, 2016, 02:17:28 am »
hi to all here.
bingo600 have you seen these
http://www.ebay.de/itm/Discovery-kit-for-STM32L0-series-with-STM32L053C8-MCU-1-Stuck-/311636279027?hash=item488ef83ef3
only 5euro and a bit much shipping(7.20 euro for one and 10euro for 10-15pcs)
BUT if you buy 10 then it's only going to cost you 60 euro(460 Danish kroner) when you get it..
and you have to remember when you use STM32F0 and STM32L0 then the full kiel IDE is free(for the F0 & L0)
Claus
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1339
  • Country: dk
Re: Quick hack to get SWO on ST-Link clones
« Reply #10 on: September 28, 2016, 03:01:29 am »
hi to all here.
bingo600 have you seen these
http://www.ebay.de/itm/Discovery-kit-for-STM32L0-series-with-STM32L053C8-MCU-1-Stuck-/311636279027?hash=item488ef83ef3
only 5euro and a bit much shipping(7.20 euro for one and 10euro for 10-15pcs)
BUT if you buy 10 then it's only going to cost you 60 euro(460 Danish kroner) when you get it..
and you have to remember when you use STM32F0 and STM32L0 then the full kiel IDE is free(for the F0 & L0)
Claus

Thanx Claus
I'll have a look

/Bingo
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 1916
  • Country: gb
Re: Quick hack to get SWO on ST-Link clones
« Reply #11 on: September 28, 2016, 03:24:34 am »
well if you ordered one,
here is the latest firmware update.  :-+

How are you finding the stability of 2.28.16 ?  I just read on Carmine Noviello's website that 2.26.16 has bricked some peoples st_links. His blog entry is confusing and probably has a typo since he writes 2.26.15 and 2.26.16

Link: http://www.carminenoviello.com/2016/02/26/restore-st-link-interface-bad-update-2-26-15-firmware/

i'v not used it yet, only got it a couple of days ago.
that said, i only use the drag&drop firmware flasher function anyway at the moment.

i hope i dont have to reflash 2.27.15.
 

Offline lujji

  • Contributor
  • Posts: 27
  • Country: 00
Re: Quick hack to get SWO on ST-Link clones
« Reply #12 on: September 28, 2016, 06:36:59 am »
How are you finding the stability of 2.28.16 ?
I had no issues at all. I don't think you can 'brick' the programmer by updating firmware. I also tried downgrading firmware about a week ago (entirely out of curiosity) and it worked just fine.
 

Offline lujji

  • Contributor
  • Posts: 27
  • Country: 00
Re: Quick hack to get SWO on ST-Link clones
« Reply #13 on: September 30, 2016, 03:44:40 am »
Look what I've got.
P.S: no soldering required)
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 1916
  • Country: gb
Re: Quick hack to get SWO on ST-Link clones
« Reply #14 on: September 30, 2016, 04:04:55 am »
is it a clone of v2, or v2-1??
and how much did it cost - compared to a nucleo-64 board?
 

Offline lujji

  • Contributor
  • Posts: 27
  • Country: 00
Re: Quick hack to get SWO on ST-Link clones
« Reply #15 on: September 30, 2016, 04:34:24 am »
is it a clone of v2, or v2-1??
and how much did it cost - compared to a nucleo-64 board?
It's a v2 clone, about 3$ shipped.
 

Offline thmjpr

  • Regular Contributor
  • *
  • Posts: 86
  • Country: ca
Re: Quick hack to get SWO on ST-Link clones
« Reply #16 on: October 02, 2016, 03:20:58 am »
It's a v2 clone, about 3$ shipped.
Instructions please?
I get error "Identifying ST-LINK variant...ERROR: Unsupported ST-LINK hardware variant" if I try to program.
 

Offline lujji

  • Contributor
  • Posts: 27
  • Country: 00
Re: Quick hack to get SWO on ST-Link clones
« Reply #17 on: October 02, 2016, 07:42:23 am »
Sorry, I don't have any instructions. But I found a strange sequence of absolutely meaningless random bytes on the internet and I have no idea what it means. Perhaps you might figure it out..
 
The following users thanked this post: thmjpr, Rasz, KaV


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf