cancel
Showing results for 
Search instead for 
Did you mean: 

STLINK-V3SET cannot communicate with target over SWIM (or doesn't work at all?) with STVD/STVP

TKole.1
Associate

I have an STLINK-V3SET with MB140B adapter.

I am trying to program an STM8S003F3P (minimum evaluation board) over SWIM

I've installed the en.stsw-link009 driver on my Windows10

I've put jumpers on JP4 and JP6

My code is specific for STM8S and compiled and builds fine.

When I use STVD or STVP to program the code on the chip, when pressing start I get the following:

Cannot communicate with the device, check the SWIM connection...

I tested continuity, everything is fine.

I actually think the STLINK-V3SET isn't working right!

When doing ST-LINK Upgrade, on Device Connect, I get: The content of the ST-Link is corrupt

I don't know if the ST-LINK Upgrade is just not compatible with the V3SET or my LINK is really broken...

How to start debugging my problem?

Thanks

15 REPLIES 15
S C
ST Employee

There is a 680 ohms pull-up to VCC on the tool side on MB1440. This pull-up is required by the SWIM protocol and that's one reason why MB1440.CN4.VCC should be provided with Vtarget. So I would say that no additional external pull-up is required. All SWIM signals are accessible on MB1440.CN4, at interconnection level they are shared with JTDI and JTDO but I suppose you did not simultaneously connect something else to the ST-Link ? [And that's why you could see things on STDC14, it's normal]

Perhaps should you try to probe the DIO pin on the tool side, while not connecting it to the target (but providing VCC), in order to ensure that the tool is correctly doing the init sequence in this case ? If yes, you'll then need to understand why the target could pull the pin low, did you connect also NRST ? [this should ensure, that during the init sequence, the STM8 pins are in input state]

CustomSarge
Associate III

Still something wrong. 5V to chip, 10k PU on DIO.

After dis / reconnect USB:

Reset line is 4.9V with a narrow pulse to ground every ~1 second

DIO is 2.8V solid.

At "Start Debugging" reset stays high, DIO pulses.

Almost immediate "error 30006 :comm init error: chip does not answer"

Reset is held ~.1V, DIO is 2.8V solid.

The Com LED is both Green & Red.

This remains until dis / reconnect USB.

Any tries until USB reset gets ""30200: st-link connection error"

Pin 42: D1 / SWIM is getting pulse train.

Just tried without 10k PU.

Same "not answer", but com LED returns to solid red, reset returns to high w/pulse and DIO is .9V

Just got your response, I'll do that next.

Without me using PU, DIO is at .9V.

OOH, Am I supposed to supply VCC to CN4?

That would explain MUCH.

And allow for 5V or 3.3V targets.

Ok, this explains MUCH: I'm supposed to supply VCC @ CN4.
It also allows 3.3V or 5V signaling to work.
I misunderstood the VCC @ CN4 description and didn't want them in conflict.
Boss wants me on something else now, I'll add the V+ -> VCC at target tomorrow.
THANKS for putting up with me.
I'm new to ST, but been building & coding assembler since Z-80 (~1977). <<<)))
Hi, on break, I sneaked back in and added the jumper - IT WORKS !!
You Made My Day THANKS ! <<<)))
VIgor.1
Associate

0693W000005BtQkQAK.pngHello. and me have problem not working st-linkv3set for stm8. Mb1440B swim=on  jp4=1 & jp6=1 and jp3=1 up to 5v. Please help me i can't figure it out. i worked all-time with avrdragon and no have problems with use anytime. Usability and easy work. Stlink very hard work and many problem for me. And software no usability. Maybe lessons or movies helpful?

CustomSarge
Associate III

Be certain you are providing your Vcc on the 4 pin cable from your target.

ST-Link needs this to to accept your targets signals.

PS, next time this should be a new thread / question. G.H. <<<)))