hoverboard-sideboard-hack-GD icon indicating copy to clipboard operation
hoverboard-sideboard-hack-GD copied to clipboard

Different SWD Programming Pins

Open timtimmahh opened this issue 4 years ago • 12 comments

On my hoverboard sideboards the SWD programming pins differ from the ones specified in sideboard pinout. From top -> bottom mine go:

  • VDD 3.3V
  • PA14 / SWCLK
  • PA13 / SWDIO
  • GND

It took a while to figure out since I thought there was something wrong with my STLINK/V2 programmer, so it might help others with the same board to add a notice in the readme for that.

timtimmahh avatar Nov 20 '20 01:11 timtimmahh

Thank you for the info. I will add it to readme. How does your GD board looks like?

EFeru avatar Nov 20 '20 07:11 EFeru

It looks almost identical to the one in your image I guess it just has some minor pin changes on the SWD interface. I know the main board connector is the same, but I haven't checked the other pins yet. GD board front GD board back

timtimmahh avatar Nov 20 '20 11:11 timtimmahh

I can add a photo of two more boards that use this pinout: sideboard

Thing is, while they can be unlocked (throwing an error, but it works after) and erased, flashing fails - similar to "flashing fails" issue, maybe? The resolution for that issue seems to be "no longer care", but it might be good to know how to identify those that WON'T work...

image image

mamert avatar Mar 12 '21 15:03 mamert

@mamert thanks for the input. For you which board works and which one not?

EFeru avatar Mar 12 '21 16:03 EFeru

Both behave identically (fail).

Though I have not had a single success with the sideboards, I have built hoverboard-firmware-hack-FOC successfully in the same VSCode, so the environment is OK

mamert avatar Mar 12 '21 18:03 mamert

Hi! I have a similar situation, but it's important to me.

SWD

  • VDD 3.3V
  • PA14 / SWCLK
  • PA13 / SWDIO
  • GND

First I clicked Option Bytes and selected disabled, got an error message "Failed to set option bytes! Please reset the target and try again", but the firmware has been erased, and the Erase Chip is running successfully. when I click Program & Verify and want to install the firmware I get an error: "Programming error @ 0x8000000!"

IMG_4421

IMG_4414

IMG_4422

perdmen avatar Dec 26 '21 15:12 perdmen

I have the same issue here with a YST board - no upload possible (and i checked the chip 5 times if it is a GD32F130 ...) - interestingly it shows as a :STM32F10xx Medium-density in ST-Link.

Has anybody sorted this out yet?

captFuture avatar Mar 21 '22 20:03 captFuture

WDG_SW option should be set. Pinout can differ between sideboards, you need to check which pin is connected to vdd, swdio, swclk and gnd.

Candas1 avatar Mar 21 '22 21:03 Candas1

Just in case, I was able to flash it with st-flash

redeemarr avatar Sep 15 '22 10:09 redeemarr

Can you explain how you did the flashing via st-flash? cant' get mine flashend as well. Mins is the green boad with the purple connector shown above.

derFrickler avatar Nov 16 '22 12:11 derFrickler

@derFrickler, nevermind, I was wrong. st-flash flashes the chip with no errors, but it doesn't work. Make sure you checked nRST_STOP, nRST_STDBY and WDG_SW checkboxes while flashing with ST-Link utility. This was the reason it didn't work in my case. https://github.com/EFeru/hoverboard-sideboard-hack-GD/issues/25

redeemarr avatar Nov 16 '22 12:11 redeemarr

Great! seems that did the trick. Thanks a lot

derFrickler avatar Nov 16 '22 13:11 derFrickler