EFeru / hoverboard-firmware-hack-FOC

With Field Oriented Control (FOC)
GNU General Public License v3.0
1.17k stars 968 forks source link

Connecting with the Hoverboard via ST-Link V2 does not work #141

Closed royrobotiks closed 3 years ago

royrobotiks commented 3 years ago

First of all, thanks for the great work on the hoverboard firmware! I'd like to flash my hoverboard with your firmware in order to control the motors via UART.

A first try ended already in a sparkling mainboard with smoke. So I ordered a new mainboard, put it in the hoverboard and the hoverboard works again after the replacement. However, I still want to flash another firmware on it and I'm still stuck at the very beginning. I have no clue what might be the problem. I'm also a complete STM32 n00b and Windows10 user, for that matter. Any advice will be highly appreciated!

Here's what I've done so far:

Then I connected SWCLK, SWDIO and GND with the ST-LINK V2. 3.3V (red wire) is NOT connected.

After that I followed the instructions on https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC/wiki/How-to-Unlock-MCU-flash - "How to Unlock MCU Flash". And I tried to connect with the controller while the board was powered on via its own battery.

Unfortunately this did not work. The error message was always "can not connect to target!". It asked me to select 'Normal' or 'HotPlug' mode from Target->Settings menu. So I've tried all options but nothing worked.

I hope anyone can help me. Thanks a lot in advance!

Here are some photos of my setup:

img_stlink_v2

img_stlink_v2_pins

img_board_connection_close

IMG_20210215_160918

In case you need more detailed info, please let me know.

Candas1 commented 3 years ago

Hi, Unfortunately this firmware is not compatible with this mainboard variant. It has a totally different chip and design.

Here is another firmware you can use: https://github.com/cloidnerux/hoverboard-firmware-hack

What do you want to do with the firmware ? Be aware you won't be able to use the mainboard in a hoverboard anymore.

royrobotiks commented 3 years ago

I'd like to control the two motors via UART. Ultimately, I want to build a line following robot with a raspberyPi & camera, which can move people.

Thanks a lot for the link! I'll give it a try tomorrow.