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

Hello,

JP3 on MB1440 is also required to be closed for SWIM to function. There is an issue in the User Manual UM2448 around that, I'm sorry for that. If you have it opened, it might explain your issue.

Regarding ST-LinkUpgrade.exe, the version delivered with STVD and STVP toolset is not accurate; the reference for an up-to-date STLink is STSW-LINK007 on st.com:

https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/stsw-link007.html

Note however that there is no SWIM specific changes in recent versions, I don't think an update is really mandatory to fix your issue.

TKole.1
Associate

JP3 was closed the whole time...

Are you saying I need to change my driver from en.stsw-link009 to STSW-LINK007?

No, STSW-LINK009 is OK as regards the driver (identification of any St-Link by Windows). STSW-LINK007 is only an update of STLinkUpgrade.exe compared to the version provided by STVD+STVP which generates the "ST-Link is corrupt" message. Do you still get this message with the STLinkUpgrade version from st.com (STSW-LINK007) ?

I may also suggest to check the version of following dlls:

  • stvp/STLinkUSBDriver.dll and stvd/swim/STLinkUSBDriver.dll: should be v5.0.3 (installed by STToolset; if you want you might try to update with the 32bits version of this dll from STSW-LINK007)
  • stvd/swim/stm_swim: should be v1.6.13

With this configuration (and JP3,4,6 closed) I've been able to connect with STVD on the target of a STM8S-DISCO. It's difficult to understand what may happen on your side

CustomSarge
Associate III

Ok, good so far... I've got same issue on Both of our STLINK-V3SET units: JP3,4&6 on.

Matching version of DLLs as above.

Here's what's different: I see the Com LED flicker on Start Debugging - as I'd expect, but my o'scope shows no change on DIO of SWIM.

So, no wonder I get "error 30006 : comm init error : chip does not answer".

None of the TX pins on MB1440B show any change - SDA, CAN, etc. (just curious)

I see on MB1441B main board: JP1 & 2 on, JP3 off - is this ok?

What am I missing? Thanks <<<)))

S C
ST Employee

Hello,

MB1441B.JP2 On is OK, this allows to provide 5V to the MB1440 board. Then MB1440.JP3 must also be On (mistake in the documentation as explained above), so your configuration seems OK. May you please check with the oscilloscope that 5V is really present on MB1440.JP3 ? And that the target voltage is also provided to MB1440.CN4.VCC ?

In this situation even in case of issue on the STM8 side, you should at least see the SWIM init sequence out of MB1440.CN4.DIO (starting with 4x2ms pulses then 4x1ms pulses)

CustomSarge
Associate III

Hi, Thanks for fast reply. +5 @ 1440 JP3 = yes, @ CN4 (or CN5) VCC = no.

CN4 VCC isn't connected on my target - I supply +3.3.

I could see the 5 vs 3.3 on my not answering, but I'm not being "asked"

(I'll be changing to +5 - board builder grabbed wrong part)

Still no DIO activity (thanks for the pulse train info).

Does DIO need the target or a pullup resistor?

O'scope set at 1V & 250mS /divs (Tektronix TDS2002 DSO).

Which pin on which interconnector should I see DIO?

Poking around, I found CN1 p10 issues a short spike at "Start Debugging"

Haven't checked all interconnect lines (hoping I wouldn't have to).

Thanks again, Ii feels like I'm making progress <<<)))

I first posted this in the thread:
Hi, Thanks for fast reply. +5 @ 1440 JP3 = yes, @ CN4 (or CN5) VCC = no.
CN4 VCC isn't connected on my target - I supply +3.3.
I could see the 5 vs 3.3 on my not answering, but I'm not being "asked"
(I'll be changing to +5 - board builder grabbed wrong part)
Still no DIO activity (thanks for the pulse train info).
Does DIO need the target or a pullup resistor?
O'scope set at 1V & 250mS /divs (Tektronix TDS2002 DSO).
Which pin on which interconnector should I see DIO?
Poking around, I found CN1 p10 issues a short spike at "Start Debugging"
Haven't checked all interconnect lines (hoping I wouldn't have to).
Thanks again, Ii feels like I'm making progress <<<)))
CustomSarge
Associate III

Just answered one question: it Does need a pullup!

Target was just pulling to ~.5V, add a 10k PU and start signal is well seen.

Issue may now be 5V vs 3.3 @ target. Sound about right?

What's best PU value @ 5V? TNX <<<)))

CustomSarge
Associate III

The 10k PU made it change from :chip does not answer" to "st-link connection error"

It is also not an immediate failure, I'd estimate a 6 second timeout to error message.

Time to change that 3.3 for a 5 is NOW. TNX <<<)))