You are here

Unable to update firmware using vesc-tool

23 posts / 0 new
Last post
iPeel
Offline
Last seen: 1 year 8 months ago
VESC Original
Joined: 2017-05-24 12:44
Posts: 9
Unable to update firmware using vesc-tool

Hi,

When I connect the VESC-6 to vesc-tool I am informed that the VESC has too old firmware and that the tool will only allow firmware update.

When I go to the firmware page I see Hardware version 60 with firmware VESC_default.bin in the two Included Files panes. I go to apply the firmware which it uploads to the device, taking less than 10 seconds and then the VESC disconnects with only the blue power light lit on the VESC. The tool claims fw upload done.

After I power cycle the VESC and try to connect, I am told the firmware is still too old and it seems the firmware update did not apply.

In each case, when I go to the firmware page the connected VESC firmware is 3.24 and the tool claims it only supports 3.25.

I have tried both in Windows and Linux with the same result.

I see other firmwares in the non-default firmwares view but none of them will update the firmware version on the connected VESC.

The tool version is 0.77.

Thanks,

Neil.

frank
Offline
Last seen: 6 days 13 hours ago
VESC BronzeVESC FreeVESC GoldVESC OriginalVESC PlatinumVESC Silver
Joined: 2016-12-27 20:19
Posts: 846
Ups, that is something to take care of. Let's see if Benjamin can solve this matter. FW upload should work seamless. Frank
frank
Offline
Last seen: 6 days 13 hours ago
VESC BronzeVESC FreeVESC GoldVESC OriginalVESC PlatinumVESC Silver
Joined: 2016-12-27 20:19
Posts: 846
First thing on the to do list for tomorrow. As soon as the problem is solved we will post the solution here.
Jacob Lord
Offline
Last seen: 5 years 9 months ago
VESC Original
Joined: 2017-05-24 12:41
Posts: 9

I am also having this problem, seems a simple update will fix, cant wait to get everything working!

iPeel
Offline
Last seen: 1 year 8 months ago
VESC Original
Joined: 2017-05-24 12:44
Posts: 9

OK thanks for confirming! Hopefully it's just something easy to fix then.

Cheers,

Neil.

frank
Offline
Last seen: 6 days 13 hours ago
VESC BronzeVESC FreeVESC GoldVESC OriginalVESC PlatinumVESC Silver
Joined: 2016-12-27 20:19
Posts: 846
I think it's just a simple mishap. Benjamin will fix that ASAP. Frank
jlcortex
Offline
Last seen: 3 years 4 months ago
VESC Original
Joined: 2017-05-24 12:48
Posts: 30

Same problem.
Can we download this 3.25 firmware version from anywhere?
Perhaps if we upload this firmware as "Custom file" it solves the problem?

benjamin
Offline
Last seen: 1 week 2 days ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 490

 

I had a look, and it seems like the test bench did not upload the bootloader properly. I had a look at the code, and I think it is possible to upload the bootloader from VESC Tool as it can write to any location in the second half of flash memory when storing the firmware for the bootloader, including to the location where the bootloader is located. The problem is that VESC Tool cannot erase the flash memory at the bootloader location, but I think the flash memory is already erased when the stm32 comes from the factory. If this solution works I should be able to update the VESC Tool download later today, which will have a "install bootloader" menu option. Otherwise, the backup solution is to upload a VESC Tool version that supports FW 3.24 and send stlink v2 usb adapters to the beta testers so that everyone can upload the bootloader.

Danny Bokma
Offline
Last seen: 2 months 2 weeks ago
VESC Original
Joined: 2017-05-24 12:11
Posts: 53

I just unpacked the VESC6 and found this issue. Luckily I have a ST-link laying around and was able to fix it.

I flashed the VESC4 bootloader ( wit the ST-Link utility ) and did the upgrade from 3.24 (the firmware that was shipped) to 3.25 with VESC-TOOL V0.77 .

It's a happy VESC-Tool now :)!

Jacob Lord
Offline
Last seen: 5 years 9 months ago
VESC Original
Joined: 2017-05-24 12:41
Posts: 9

Any Eta on when the problem will be fixed for all us not ST-Link owners :P ?

frank
Offline
Last seen: 6 days 13 hours ago
VESC BronzeVESC FreeVESC GoldVESC OriginalVESC PlatinumVESC Silver
Joined: 2016-12-27 20:19
Posts: 846
It will be solved ASAP. If we face problems sorting this out tonight, we can compile a VESC-Tool with FW 3.24 to bridge the gap. Benjamin should get the same VESC, you guys have, tomorrow. We can also test the Fix on my VESCs, which arrived today and have the same issue. No worries, help is close. Frank
Roger Wolff
Offline
Last seen: 1 year 9 months ago
VESC Original
Joined: 2017-05-24 12:27
Posts: 202

I have plenty of STLinks here. So if it comes to that, no need to send me one.

iPeel
Offline
Last seen: 1 year 8 months ago
VESC Original
Joined: 2017-05-24 12:44
Posts: 9

Given how much STM32 stuff I have around here an STLink2 looked like a good thing to have around, so one arrives today.

Sanjoy
Offline
Last seen: 6 years 2 months ago
VESC Original
Joined: 2017-05-24 12:45
Posts: 20

Same problem here.

sl33py
sl33py's picture
Offline
Last seen: 6 years 6 months ago
VESC Original
Joined: 2017-05-24 12:32
Posts: 28

The last time i did this, i did it in linux (which i'm a noob) following Ben's copy/paste instructions...

How easy is it to do in the new tool if we have the STLink already?

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

It would be as easy as last time.

I think it is not possible to fix a not available boot loader. But lets see what Benjamin the magician does. I think the fastest would be uploading the appropriate VESC Tool for FW3.24.
Or you just send to all of us the Raspberry Pi with the touch interface, so we can flash the new firmware ourselves. :D (Just kidding if it is not obvious)
But I think that most serious BETA tester have a STLink laying around. That is what set them apart form "normal" VESC end users.

frank
Offline
Last seen: 6 days 13 hours ago
VESC BronzeVESC FreeVESC GoldVESC OriginalVESC PlatinumVESC Silver
Joined: 2016-12-27 20:19
Posts: 846
Sure, serious VESCers have an ST-Link. Would be good to have a solution for the average user. Lets see what happens tomorrow. Maybe magic happens, maybe not. I will get myself a ST-Link V2 anyway. Filthy cheap and very very useful. A bad USB cable can ruin your FW upload and then you you are really lucky to have that 5€ toy in your pocket.
frank
Offline
Last seen: 6 days 13 hours ago
VESC BronzeVESC FreeVESC GoldVESC OriginalVESC PlatinumVESC Silver
Joined: 2016-12-27 20:19
Posts: 846
Do not connect the 3.3V pin, using a simple ebay ST-Link! That will kill the 3.3v regulator, which results in almost having a short in the 3.3v rail. The 3.3v on the swd connector is only for sensing 3.3v with the st branded stlink programmers. When using the small eBay stlinks the 3.3v should be left unconnected. The vesc 4 did not have this problem since it uses a different regulator. Fixing this is easy if it should happen, it will work after replacing the 3.3v regulator.
benjamin
Offline
Last seen: 1 week 2 days ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 490

 

I got a box of VESCs today and had a chance to experiment a bit. Since the flash memory is erased by default I was able to add a hackish way to VESC Tool to upload the bootloader by using the firmware upload command and adjusting the offset. I have tested this on a few VESCs, and it seems to work. The new versions of VESC Tool are compiling now, and should be ready for download in 20 minutes or so.

The change is that there is a bootloader tab in the firmware page of VESC Tool where the bootloader can be uploaded. So, to get the new VESCs running, first go to the bootloader tab in the firmware page and upload the bootloader, then go back to the included files tab and upload the firmware. After a reboot everything should work.

I'm sorry about the inconvenience. The source of the problem was that I had a small typo in the test bench that would upload the bootloader to the wrong address and then overwrite it with the firmware.

jlcortex
Offline
Last seen: 3 years 4 months ago
VESC Original
Joined: 2017-05-24 12:48
Posts: 30

I confirm it worked for me. I have 3.25 firmware and ESC is working!

frank
Offline
Last seen: 6 days 13 hours ago
VESC BronzeVESC FreeVESC GoldVESC OriginalVESC PlatinumVESC Silver
Joined: 2016-12-27 20:19
Posts: 846
Benjamin, you are a STAR! Brilliant! Frank
hexakopter
Offline
Last seen: 1 year 1 week ago
VESC Original
Joined: 2017-05-24 12:13
Posts: 94

Amazing that it worked. Great to hear that. You are now a proven magician Benjamin. :D

Sanjoy
Offline
Last seen: 6 years 2 months ago
VESC Original
Joined: 2017-05-24 12:45
Posts: 20

Hi Frank, many thanks to you and Benjamin for the the swift response and fix! I'm up and running now so will be out on my emtb tomorrow and start giving some feedback.
Sanjoy.