VESC - Installing a bootloader

Just wanted to pint out you need to power on the FocBox to be able to connect via ST-Link otherwise you will get a “Can’t not connect to target” message.

Connect 3.3V only if you don’t power the FOCBOX by the main leads. But if you don’t connect 3.3V, that’s normal that is does not work.

What you want avoid is connecting simultaneously main leads power AND 3.3V from STLink.

1 Like

You never ever want to connect the 3.3V PIN! This is a sniffer PIN, allowing the original ST Link to see that the ST processor is powered up so that it can be programmed. The clone ST Links apply 3.3V instead of sensing 3.3V!

Yes I want Sir !

How would I power the MCU without bringing it 3.3V on Vcc ? This is the purpose of the SWD 5th pin regarding Ben’s HW6.4 schematics :

Again, I don’t power the VESC through its main leads while programming.

Anyway, did it on FOCBOX and quite a few ESCape without any issue.

But please @Eboosted, stick to @trampa advice. I don’t want any trouble.

1 Like

https://www.vesc-project.com/node/80

Dead voltage regulator

One of the VESCs that I repaired had a dead 3.3v regulator. One way to kill the regulator is to feed it backwards with a 3.3v source, which has happened to me a few times when connecting a programmer.

Solution: Never feed the 3.3v net with voltage, only current draw is allowed. If you, for example, have a stlink v2 from ebay that outputs 3.3v on a pin then don’t connect that pin - power the VESC from the input while the programmer is connected.

Edited by: benjamin on 2017-07-07 11:17

2 Likes

That’s good to know. Fortunately I powered the vesc through the xt60.

I’m getting a blinking red light that flashes 3 times after being connected by ST Link. Nothing else is connected, any ideas?

can i get those instructions i cant seem to connect to my focbox

Thiss was a couple of years ago, I don’t quite recall. Where are you getting stuck?

If I remember correctly the process was:

  • Connect your STLink 2 adaptor as follows:
    • Focbox <-> Stlink
    • Rst <-> Rst
    • Dio <-> Swdio
    • Clk <-> Swclk
    • Gnd <-> Gnd
    • 3.3v <-> 3.3v
  • Load the STLink tool (See here and here)
  • Download whatever VESC firmware you want to upload (I used 2.18 after failing to upload 3 or 4)
  • Open the firmware bin file in the STLink tool, click write or upload or whatever feels like a good upload button (might be under STLink or Target or Edit in the top menu)
  • Cross your fingers it works…