Skip to main content
n__it
Associate
July 17, 2013
Question

Can i use ST-LINK/V2 to program flash for STM8S series

  • July 17, 2013
  • 5 replies
  • 4339 views
Posted on July 17, 2013 at 10:21

Hi to all,Can i use ''ST-LINK/V2'' to program flash for STM8S series?

#st-link/v2
This topic has been closed for replies.

5 replies

RallyTronics
Associate II
August 23, 2013
Posted on August 23, 2013 at 05:14

I use ST-LINK/V2 all the time for STM8S parts.

Dmitriy Kozubenko
Visitor II
May 22, 2017
Posted on May 22, 2017 at 20:55

Hi all, I bought st-link\v2, but I can't connect to stm8, to stm32 on jtag it connect without problem.

Same device on stm8 perfect connect by stm8l152C6T6_discovery_board.

What do I do wrong?

Szymon PANECKI
Senior III
May 31, 2017
Posted on May 31, 2017 at 21:44

Hello,

ST-LINK/V2 is a programming/debugging tool for two MCUs families: STM32 and STM8. Both of them use different interface (STM32: JTAG or SWD; STM8: SWIM) and as a result ST-LINK/V2 provides two connectors, one for each family.

To use ST-LINK/V2 with STM8 you need to use 4-pin connector named STM8. These four pins are: VDD, GND, SWIM and Reset. If you connect these pins (at least VDD, GND and SWIM, because Reset is optional) to relevant STM8 pins, then you are ready to debug and program the MCU. Please find below a photo showing ST-Link/V2 connected with STM8L052:

0690X00000603lyQAA.jpg

If you want to use ST-LINK/V2 with STM8 Discovery kit, then first you need to connect ST-LINK/V2 pins to MCU pins and second you need to disconnect ST-LINK embedded on Discovery kit by opening jumpers on CN3. Please find below a photo showing this:

0690X00000603KeQAI.jpg

Szymon

Dmitriy Kozubenko
Visitor II
June 1, 2017
Posted on June 01, 2017 at 11:56

Yess!! Working. I all did the right, but I did not know one nuance, my ST-LINK don't powered my device.

You helped find error in st-link.

And now new question: How I can powered programmed my target device via ST-Link\V2?
Szymon PANECKI
Senior III
June 1, 2017
Posted on June 01, 2017 at 13:49

Hello Dmitriy,

I am glad that you solved the issue.

Indeed SWIM connector can't supply the MCU. This connector provides a VDD pin, but its purpose is not to supply the MCU, only to verify if MCU is already supplied.

Typically MCU should be supplied from its own supply source, not from ST-LINK. However I believe that you can use ST-LINK for this purpose. Based on

http://www.st.com/resource/en/user_manual/dm00026748.pdf

it looks that second connnector (JTAG/SWD connector for STM32) provides both 3.3V and GND (pins 19 and 20).0690X00000607CXQAY.png

Regards

Szymon