You are here

Problem with St Link v2 Connetion (solved)

8 posts / 0 new
Last post
Izuke
Offline
Last seen: 8 months 3 weeks ago
Joined: 2018-04-09 22:04
Posts: 7
Problem with St Link v2 Connetion (solved)

Hey guys,

I have some problems with connecting my Vesc to a ST Link v2.
I tried to upgrade my Vesc (hw 4.12) from fw 2.18 to the newest version with the Vesc-tool. Unfortunately, i did not take a look at the forum and misunderstood the warnings so i overwrote my bootloader.
Because of this (as i read afterwards at the forum) i destroyed my bootloader and can't upgrade my vesc. Bought an ST Link v2 clone on amazon and got it yesterday.

Now the problem is, that i can't get a connection between the ST Link and my vesc. The vesc is running still properly on fw 2.18. When I turn it on it shows the blue LED, then the red one flashes a few times, so no problem with my Vesc running on the old fw.
I connected the ST Link as followed:
DIO -> SWDIO
GND -> GND
3.3V -> 3.3V
CLK -> SWCLK
When i now plug the ST Link into the usb port, the blue LED on my Vesc turns on and the red LED blinks twice repeatedly with a short break after each second blink.
The ST Link is shown in the Settings section at the ST Link utility (utility shows that the Link has an old firmware version but it should work fine, I tried to update the ST Link but it failed).
By trying to connect the ST Link and the Vesc, ST Link utility shows an error message saying there is no device connected or something.

Does someone have any idea what the Problem with my Vesc and/or ST Link could be?
I really want to upgrade my Vesc and run my Motor in FOC instead of BLDC Mode.

 

Thank you for your help.

Izuke
Offline
Last seen: 8 months 3 weeks ago
Joined: 2018-04-09 22:04
Posts: 7

Is there anyone with a similar Problem or maybe with a solution or a suggestion?

Update: I checked all my connections, they are fine. Now i start to rethink my problem. Could the reason be a defect ST Link clone?
The clone seems to work fine because ST Link utility can detect it, but the failing update off the ST Link let me think that theirs something wrong with ST Link itself.
Is it possible, that theirs a missing pin connection in the ST Link so the ST Link is not able to program or get programed but is still detectable by the ST Link utility?
At the Moment i consider buying an original ST Link, but i don't want to waste more money for an other programmer ^^
I would be really glad for any kind of adviselaugh

Izuke
Offline
Last seen: 8 months 3 weeks ago
Joined: 2018-04-09 22:04
Posts: 7

I bought a second ST Link from an other seller. It is also a china clone, with an older software.
Though i tried a complete other ST Link, i still can get a connection to my Vesc.
ST Link utility says (under tag "STM32 Target Information" in the Settings tab)
Target: Connection failed
Target Voltage: Detection failed

I don't think, that it is a failure with the ST Link because i tried two diffrent ones.
Is anyone able to help me or could get me some information, please. I do not know what to do further.

 

Izuke
Offline
Last seen: 8 months 3 weeks ago
Joined: 2018-04-09 22:04
Posts: 7

It is me again. I'm not sure if anyone has any interest in this at all, but i'm sharing my experience anyway^^

I finally managed to get a connection to  the vesc. As I did not know what to do and neither did not feel like spending 40€ for an original ST Link I decided to try a third "cheap" ST Link clone.
This one cost my 12€ on amazon, the first two were around 8€ and 5€, but this one finally workedsurprise
I just had to connect the Reset Pin to get it running (unlike mentioned at some forum post).
Afterwards flashing the bootloader and updating my Vesc to FW3.18 was no problem =)

Just one thing left. Vesc tool now detects the Vesc as HW 4.10 instead of 4.12 as it should detect it, but this should not be a problem at all.

hexakopter
Offline
Last seen: 1 year 1 month ago
VESC Original
Joined: 2017-05-24 12:13
Posts: 94

Great that you already figured it out. Maybe your problem was using the 3.3V from the china clone ST Link and not the reset pin?(I flashed without the reset pin in the past) Do you have the openocd output from the failed flashing try available? When you look at this thread: https://vesc-project.com/node/45 you see that with the VESC 6 that 3.3V connection would make even more trouble.

Izuke
Offline
Last seen: 8 months 3 weeks ago
Joined: 2018-04-09 22:04
Posts: 7

i don't have an openocd file. There was also no failed flashing try, because i didn't get to the point where you can hit the "program" tab in the st link utility.
I tried to flash my vesc with and without the reset Pin. In my case it only worked with the reset pin. I also read the thread concerning the 3.3V connector problem at vesc 6. But my vesc is hw 4.12, so this was not a problem. Didn't fry the 3.3V at my vesc =)

Good luck that I order on amazon, so I had no problem to return the first and second st link.

maple_leaf
Offline
Last seen: 3 years 3 months ago
Joined: 2019-07-08 08:21
Posts: 3

I am encountering the same situation now, the same china clone stlink v2, the same VESC 4_12.
Thanks to your solution, I'll have a try later ^^

maple_leaf
Offline
Last seen: 3 years 3 months ago
Joined: 2019-07-08 08:21
Posts: 3

Suddenly think of one thing just now... I've tried my STLINK with another two boards, they can be programed fine.

Did you ever verify your first STLINK with other board before?

Thanks in advance!