bipropellant / bipropellant-hoverboard-firmware

OpenSource Hoverboard firmware based on Niklas Fauth's one https://github.com/NiklasFauth/hoverboard-firmware-hack
GNU General Public License v3.0
176 stars 74 forks source link

STM32 Utility ST link v2 USB-Dongle is not work #40

Closed uhi2000 closed 5 years ago

uhi2000 commented 5 years ago

Hello, I have a problem with flashing the firmware with Windows 10. I have connected the USB -ST link v2 dongle as described without 3.3v. The STM32 ST Utility 004 writes "Can not connect to target". I really do not use the 3.3volts? "why"??? please help.... I really not use the 3.3volts? I have connected the motherboard with an external power supply 36V.

AntumArk commented 5 years ago

Have you powered your board with battery?

uhi2000 commented 5 years ago

I have an external 36v power supply connected. Can I now connect the 3.3 Volts on Hoverboard mainboard on the ST link V2 USB Dongle, without that which goes crash ???

AntumArk commented 5 years ago

you need to hold power button when flashing. Otherwise, you need to disconnect power supply, and connect stlink with 3.3v. It should flash.

uhi2000 commented 5 years ago

thanks my friend, I will try it tonight......I hope it works without crash...

uhi2000 commented 5 years ago

if I put the USB-Link dongle in the USB port of my PC, then I press the connected button in the STM32 Link Utility. but it always comes the error message "no target connected" of the stick but recognized in the STM32 link. What do I'm wrong ??? how should he flash if he is not connected to STM32 Utility Link as long as there is no connection with the USB stick, I can not flash!!!please help me...Can you maybe tell me what the settings have to be in the STM32 link Utility???

AntumArk commented 5 years ago

Can you send me a photo of your setup? Have you unlocked your hoverboard while following Flashing? https://github.com/NiklasFauth/hoverboard-firmware-hack/blob/master/README.md

uhi2000 commented 5 years ago

i am beginner, please tell me where can i upload pictures here?

AntumArk commented 5 years ago

https://help.github.com/en/articles/file-attachments-on-issues-and-pull-requests

uhi2000 commented 5 years ago

20190614_163410

uhi2000 commented 5 years ago

20190614_163323

uhi2000 commented 5 years ago

20190614_163307

uhi2000 commented 5 years ago

the Hoverboard Mainboard is new..

uhi2000 commented 5 years ago

I wanted to flash it with the Hoverboard Hack master-file

AntumArk commented 5 years ago

Connection mode - connect under reset (instead of normal).

Also attach how is your system connected(electronics).

Do you have linux system?

uhi2000 commented 5 years ago

no windows 10

uhi2000 commented 5 years ago

and so I connected it. as described

AntumArk commented 5 years ago

Connect 3.3v from Stlink to hoverboard and try again. Make SURE that your battery is disconnected!

uhi2000 commented 5 years ago

and put the dongle in my usb port .This is right..power on and hold button...no akku no power supply on? ???

uhi2000 commented 5 years ago

no power on???

uhi2000 commented 5 years ago

ok, I'll try it right away.. I'll let you know in 1 hour

AntumArk commented 5 years ago

Do not connect the battery.

uhi2000 commented 5 years ago

I just do not understand why Niklas Fauth shows the picture with 3 cables instead of 4 connections. that is not correct

AntumArk commented 5 years ago

Because there are two ways of flashing. Flashing with and without battery. Flashing without battery is safer.

Without battery you also connect stlink 3.3v. With battery you do shouldn't connect 3.3v from stlink.

uhi2000 commented 5 years ago

I thank you first for your help and will try it out. I hope I get a connection and then can flash

AntumArk commented 5 years ago

@btsimonh Do you know how to unlock hoverboard on Windows? I only know how to do it in linux.

uhi2000 commented 5 years ago

i dont no

btsimonh commented 5 years ago

I used OCD on windows too... I think. Was not easy :( I only program from pi now .....

uhi2000 commented 5 years ago

I think that does not work with the Hover.Master Hack.-Hex file..or yet?

AntumArk commented 5 years ago

It is different series controller than original hoverboard. This code is for 103 series. Unfortunately you will need to look for another repository for that black board.

And for your green one, you need linux operating system computer (raspberry pi, or dual boot linux) to unlock your board before you can upload code.

uhi2000 commented 5 years ago

sorry i have the old board stm32f103 .soory but the old mainboard but still no connection

uhi2000 commented 5 years ago

shit

AntumArk commented 5 years ago

Try using openocd on windows, or get linux

btsimonh commented 5 years ago

Seems at one time I wrote it up :) try https://github.com/btsimonh/hoverboard-firmware-hack/blob/newprotocol/otherboards/YST-6.5-10-PCBA-10/programming.md

and just updated and put in our wiki here:

https://github.com/bipropellant/bipropellant-hoverboard-firmware/wiki/Flashing-from-windows-or-linux-with-Open-OCD

btsimonh commented 5 years ago

@uhi2000 - I can't quite read the CPU identifier - but it's not an ST chip. no? Maybe it has different programming needs? A 'true' ST utility will most likely not connect on commercial grounds :). But OpenOCD should (and should help you identify the chip, I guess).

when you have it running, pls buzz these: image to the CPU to see what extra lines we have :). Then document in the wiki the board identification and the likely available pins, if you have the time. Also this: image

btsimonh commented 5 years ago

found this: https://www.eevblog.com/forum/microcontrollers/problems-compiling-code-for-at32f403/ does not help a lot, but worth following.

uhi2000 commented 5 years ago

thanks for help, i have a MainboardSTM32F103RCT6, maybe it's locked

uhi2000 commented 5 years ago

if I put the USB-Link dongle in the USB port of my PC, then I press the connected button in the STM32 Link Utility. but it always comes the error message "no target connected" of the stick but recognized in the STM32 link. What do I'm wrong ??? as long as there is no connection with the USB stick, I can not flash!!!please help me...i have the 3,3volts connected and the mainboard is blinking and piep, and i hold the power-Button!!!

uhi2000 commented 5 years ago

20190615_121810 ![Uploading 20190615_111110.jpg…]()

uhi2000 commented 5 years ago

20190615_111110

uhi2000 commented 5 years ago

ST-LINK^V2 i have order now!!!

AntumArk commented 5 years ago

your wiring is incorrect. 3.3v is correct but others not.

uhi2000 commented 5 years ago

yes is correct

uhi2000 commented 5 years ago

the mainboard is blinking

uhi2000 commented 5 years ago

and piep

uhi2000 commented 5 years ago

but no connected with STM32 or STM8

uhi2000 commented 5 years ago

shit

uhi2000 commented 5 years ago

mybe the USB Dongle is defect??

AntumArk commented 5 years ago

Your red(swclk) wire goes to last pin in your photo. Last wire should be SWDIO.

Your brown wire(swdio) goes to third pin in your photo. It should be GND.

uhi2000 commented 5 years ago

20190615_124028

uhi2000 commented 5 years ago

is correct??