You are here

Flashing via SWD works, but no green LED or USB enumeration

2 posts / 0 new
Last post
vpl
Offline
Last seen: 5 years 4 months ago
Joined: 2018-09-21 13:03
Posts: 5
Flashing via SWD works, but no green LED or USB enumeration

Hi everyone,

I uploaded a custom firmware to my 4.12 Vesc via the Vesc tool, but after that the Vesc didn't reconnect via USB. So I flashed the firmware directly via an ST-Link V2-1 from a Nucleo board, which did flash and verify.

However I still don't see anything in dmesg when I plug in the USB. The vesc tool also doesn't connect or display a port.

From what I've read the green LED is also supposed to blink three times after reset? For me, only the blue one is on. I can see that when the controller resets after flash&verify, the red and green LED are on very shortly and not very bright.

What can I do to bring the Vesc back to life?

 

Edit: I just noticed that when I flash the original 3.40 firmware bin and don't disconnect the programmer, the green LED stays on. I can even connect the Vesc tool via USB! However as soon as I unplug the programmer, The green LED goes off and the Vesc USB connection is lost. So maybe it's a problem with some onboard voltage regulator? The Vesc is connected to 24V at all time and won't connect to the programmer if it isn't.

 

Cheers
Laurenz

vpl
Offline
Last seen: 5 years 4 months ago
Joined: 2018-09-21 13:03
Posts: 5

I figured it out: Power is fine. I had the wrong arm-none-eabi-gcc installed. Weirdly, I could completely compile the firmware, but the images were not functional.

I had to

sudo apt-get remove binutils-arm-none-eabi gcc-arm-none-eabi
sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
sudo apt-get update
sudo apt-get remove gcc-arm-none-eabi
sudo apt-get install gcc-arm-embedded​  # <-- this fails (!), see https://bugs.launchpad.net/gcc-arm-embedded/+bug/1745143
sudo dpkg --force-all -i /var/cache/apt/archives/gcc-arm-embedded_7-2018q2-1\~bionic1_amd64.deb

So in the end I had to break my gcc-avr installation >:( I don't understand why vesc uses this toolchain instead of the standard one?

USB now comes up as expected, with both original and custom firmwares.