2023-05-29 05:24 PM - edited 2023-11-20 04:23 AM
Hello,
I have been stuck trying to connect my ST-Link V2 to my custom PCB. I am confident that each of the connections made on the schematic are correct and that the solder joints are ok. I have tested everything with a multimeter. I have tried updating firmware, updating STM32CubeProgrammer, erasing board memory, flashing a program via USB that is configured to communicate via SWD, changing mode from normal to under reset, changing reset mode from hardware to software, and tried connecting with BOOT0 pulled high and low. I am using an STM32F446RCT6 with PB2 pulled low. Sorry if I am missing any information that may be useful. Any guidance is appreciated.
Schematic is above. It is very rough as this is just a quick and dirty test board for the IMU attached. The pin numbers don't even match the datasheet for the MCU but the position of each pin does correspond to the correct pin. Also, the 1uF cap has been replaced with a 100nF cap on the reset line.
2023-05-29 06:51 PM
Not clear what's actually connected. Diagram?
The authentic ST-LINK/V2 needs a 3.3V from the target on pin 1 or 2
Common Ground
SWDIO and SWCLK
Optionally SWO/PB3
Optionally NRST
2023-05-29 07:06 PM - edited 2023-11-20 04:24 AM
Everything is connected as shown here. I have tried connecting the board to both VAPP and to VDD. I have also tried with both SWO and NRST unconnected and connected. Also just confirmed that SWCLK is working and SWDIO is working with an LED and a slow motion video however I am not sure if they are in sync with each other.
2023-05-29 07:32 PM
Does STM32 Cube Programmer report the correct voltage?
2023-05-29 08:11 PM
I believe so. STM32CubeProgrammer reports 3.21-3.23 while the board is powered at 3.300
2023-05-29 10:34 PM
I'm afraid no one will be able to help you without the schematic.
2023-05-30 08:29 AM
updated post with schematic
2023-05-30 10:00 PM
I updated the post with the schematic I am using if that is of any use. I also double checked that all of the pins are soldered correctly and there are no shorts or bridges.
2023-05-31 02:44 AM
I don't see any error in the schematic. If the connection with the STLink is correct, either the MCU or the STLink is faulty. It would be best to verify the STLink function with some functional MCU (eg Nucleo64 board).
2023-06-01 04:15 PM
Ok thank you for the help. At least I can narrow down the issue a little more and stop worrying about the schematic.