You are here

Can't program bricked Vesc 6 over SWD

7 posts / 0 new
Last post
Rc 44
Offline
Last seen: 2 months 2 weeks ago
VESC Original
Joined: 2019-01-28 20:36
Posts: 11
Can't program bricked Vesc 6 over SWD

I’m making a build with two Vesc 6’s that was working okay until I went to update the firmware. One worked flawlessly but the other one got its power disconnected in the process. Now I’m with one Vesc functional and the other one only with the blue light on, and I can’t connect to it with the usb port, which means it’s probably bricked.

I bought a ST Link V2 clone to connect to it, but it kept giving an “could not connect to target” error even after checking the wiring many times (Gnd - Gnd, Swclk - Clk, Swdio - Io). I tried connecting the St link to the working Vesc as well but I had the same problems, so It’s not an issue with the Vesc itself.

I also tried connecting one Vesc to the other and using “SWD Prog” through the Vesc Tool but it also gave target errors.

What am I doing wrong? Do I need to buy a original St link like an Nucleo board?

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

How are you powering the VESC?

Rc 44
Offline
Last seen: 2 months 2 weeks ago
VESC Original
Joined: 2019-01-28 20:36
Posts: 11

I’m powering it with a 6s lipo. I didn’t power it with the st link because it wasn’t recommended by some people on the forums.

Rc 44
Offline
Last seen: 2 months 2 weeks ago
VESC Original
Joined: 2019-01-28 20:36
Posts: 11

Sorry for the delay, I managed to get it fixed using the Nucleo board. In my case I had to connect the reset pin and enable “Connect under Reset” on the ST Utility settings menu, then I was finally able to flash the bootloader and firmware. For some reason the ST Link clone I was using before had a connection issue, therefore I don’t recommend buying these, even though some of them might work.

Thanks

chris-H
chris-H's picture
Offline
Last seen: 3 years 4 months ago
Joined: 2019-04-03 16:41
Posts: 3

Hi RC44. I am having the identical issue with a bricked v6.0 FSESC, no communication via USB, and will not connect using an STLink either.

I too also attempted to connect to the bricked v6.0 FSESC using VESC Tool, via another working ESC, under the SWD tab, and again similar error message "Could not connect to target".

I do not have a Nucleo board, but wanted to ask if there is a way to manual set the (NRST)reset pin. can I just short it to GND while attempting connection?

Why is it that your set up with the Nucleo board worked? and the STLink did not?

Chris

Chris Hamblen

Rc 44
Offline
Last seen: 2 months 2 weeks ago
VESC Original
Joined: 2019-01-28 20:36
Posts: 11

Hi Cris-H,

I never tried manually grounding the NRST pin, it could work. I believe that the only issue would be getting the timing right, but I don't really know much about SWD signals.

 

I believe that the STLinks that I was using had issues with one of the pins (either SWDIO or SWCLK), or had them in a different mapping from the one in the label.

The Nucleo board might have better quality and reliability. I got the recommendation to use it from this forum: https://www.electric-skateboard.builders/t/i-might-have-bricked-my-esc-help/95393/22. Maybe you could get more information there.

Rc 44

amit_bhar
Offline
Last seen: 10 months 2 weeks ago
Joined: 2021-01-02 02:15
Posts: 2

I am also getting "Could not connect to the target" while connecting to nrf51 module using vesc swd port. I am using Flipsky FSESC4.20 board to flash wt51822-s4at nrf51x module. I have connected gnd, swdclk, swdio and 3.3v from vesc to the nrf51 module. When I try to connect to the nrf module in the swd prog tab of VESC tool, I get message "could not connect to the target."

What am I missing? Should I connect RST also from vesc SWD port to nrf51 module? Please help.