Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't connect ST Link #5

Open
IerwinDE opened this issue Mar 17, 2023 · 2 comments
Open

can't connect ST Link #5

IerwinDE opened this issue Mar 17, 2023 · 2 comments

Comments

@IerwinDE
Copy link

Hello everyone,

The hoverboard I received today contained the split Mainboards based on GD32F130K6. I was hoping for the original hardware but since this is what I have I wanted to try if I can make it work.

Following the readme I first tried to connect with ST Link without any modifications.
I used the board that does not have a buzzer and I disconnected absolutely everything.
Hope it is okay up to this point.
I bridged the power switch, even if it never said so in the guide, because that's what needs to be done to the single control board.
Couldn't connect ST Link, so the next logical step was to utilize NRST.
I find itbl very strange that one picture in the Readme suggests to connect to the closest neighbor which is the resistor labeled R88 on my board but in the picture of the flashing setup it looks like there was no connection there. Maybe R88 isn't even the correct place to put NRST?
I used a WeMos D1 Mini to negate RST using a simple program like the one described in the Readme. The esp8266 uses 3.3v already so I wired it up directly to RST and NRST.

Unfortunately I still don't get anything but an error Message in ST Link Util.

Is there anything else I should try?

@IerwinDE
Copy link
Author

double checked my wiring and als traced the ST Pins to 100% sure they are correct (order on my board is 3.3V, DIO, CLK, GND).
Now when I plug in the ST Link the LED on it turns red.
When I press connect in ST Link Util the LED blinks red/blue for a while before the Software shows:

22:37:17 : Can not connect to target!
                  Please select "Connect Under Reset" mode from Target->Settings menu and try again.
                  If you're trying to connect to a low frequency application , please select a lower SWD Frequency mode from Target->Settings menu.
22:37:20 : Core is held in reset

The "Core is held in reset" Part is new, did not ge that before

@IerwinDE
Copy link
Author

I did it!
It was either a problem with my super sketchy wiring ("only needs to function once, why do it properly") or it just required several attempts for some completely random reason.
But suddenly I was able to connect and set the option bytes.
Now that this issue is here I will at least try to add some valuable information for the next person:

I can confirm the little Resistor between al the Cs is where the NRST has to go.
Thats a tough soldering job but it is possible using a very small soldering tip and wire and a steady hand.

And using a WEMOS D1 the code for NRST looks like this:

void setup() {  
  pinMode(D3, INPUT);
  pinMode(D3, OUTPUT);
}

void loop() {
  int rst = digitalRead(D2);
  digitalWrite(D3, !rst);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant