You are here

When SWD Program Connect Fails

1 post / 0 new
canoeman
Offline
Last seen: 2 weeks 3 days ago
VESC Free
Joined: 2020-03-23 15:48
Posts: 34
When SWD Program Connect Fails

I had a bricked vesc that failed to program via swd then failed to even connect via swd. I did a fair amount of searching and came across a tip on the spintend website that deserves to be posted here for all to find more easily. First check if your vesc to vesc swd connection works the normal way. Watch the video: https://youtu.be/PFFiVxFHDM4 starting at 5:40. If that doesn't work, try this:

Procedure:

  1. Start with a normal vesc to vesc swd cable like the trampa one (see picture 1), or make your own with JST PH parts
  2. Add a wire connected to the rst pin of the swd port on the bricked vesc (blue arrow, picture 1) and another wire connected to any gnd pin on the bricked vesc. Strip these wires on the ends so you can short them together (see picture 2)
  3. Plug in your cable like in picture 2
  4. Connect to the good vesc on VESC Tool via usb and navigate to the "SWD Programmer" page.
  5. Steps 4 through 6 should be done as a quick sequence:
  6. Short rst to gnd (circled in green, picture 2)
  7. click "connect" in the "SWD Programmer" tab of VESC Tool
  8. Disconnect rst from gnd
  9. You will now have successfully connected to your bricked vesc via swd and can program it so that it works again. Remember to pick the right firmware!!!

Picture 1: A normal vesc to vesc swd cable with empty rst position shown by blue arrow

trampa swd.PNG

Picture 2: Setup that allows user to short rst to gnd during swd connect. Note that it's the rst and gnd on the BRICKED vesc that are important, not the good one we are using to do the programming

swd_save.jpg

Thank you Vedder for adding this handy feature.