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:
- Start with a normal vesc to vesc swd cable like the trampa one (see picture 1), or make your own with JST PH parts
- 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)
- Plug in your cable like in picture 2
- Connect to the good vesc on VESC Tool via usb and navigate to the "SWD Programmer" page.
- Steps 4 through 6 should be done as a quick sequence:
- Short rst to gnd (circled in green, picture 2)
- click "connect" in the "SWD Programmer" tab of VESC Tool
- Disconnect rst from gnd
- 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
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
Thank you Vedder for adding this handy feature.