I have been reverse engineering my electric longboard remote for the past couple days and have been attempting to get a ST Link V2 connecting to it via some test pads on the PCB I found. I know the test pads are for SWD because tracing the pads on the PCB with a connectivity detector tells me that they each connect to the following:
The Processor is a STM32F103C8T6 I soldered some wires to each pad then tested continuity between them (to make sure I didn't solder two together) and then tested the continuity of each wire to the corresponding pin on the cpu guaranteeing that each wire was properly connected. I then connected the pins to corresponding pins on the ST-Link Clone (Multiple sources online said not to connect the VCC to StLink Clones when powered external which I tried, I also tried connecting it with a 10K resistor also suggested neither changed anything) and then loaded up StLink Utility on my Windows Box. The ST Link showed up fine and I upgraded its firmware successfully. When I went to connect to the STM32 tho it wouldn't. I tried swapping clock and data and tried every setting on the page for connection (Connect on Reset, Hardware Reset, Software Reset, Frequency, JTAG ...). Nothing would work I then tried on my M2 MacBook using STM32 Programmer (I believe it's the newer STLink Utility compatible with Mac OS) and the results were the same. I then checked each wire again and also resoldered the pads, neither changed anything. I then tried OpenOCD and it connected to the STLINK but failed to connect to the STM32 also. At the moment I am at a lost of what to do next, I've been to every forum on the internet that mention STM32 and SWD and none have helped. During my research I figured out that if the loaded firmware uses the pins for something else they will not work for SWD, I don't believe this is the case since the traces don't connect to anything else. I also learned of Debug Authentication but am confused at what it is and determined that my cpu probably doesn't support it (not entirely sure tho!). Is there anything I'm missing. I don't have access to the firmware on the chip. Is there anyway I can test if SWD is even enabled on the chip? Is it worth buying a proper ST-Link to try it? Am I missing something very basic? I am a freshman CE student and am doing this just for fun. Edit. I see the processor is a GD32 not STM32 but it should still work with stlink according online