How to use STM32F407-DISC1 onboard ST-LINK to program another STM
Hi
I'm trying to use my STM32F407-DISC1 board's onboard ST-LINK to program a STM32 black pill (STM32F103C8), but can't get it working for the life of me.
I've connected the two boards as follows:
- Discovery SWD Pin 2 (SWCLK) -> Black Pill SCLK
- Discovery SWD Pin 3 (GND) -> Black Pill GND
- Discovery SWD Pin 4 (SWDIO) -> Black Pill DIO
- Discovery JP1 -> Black Pill Vcc (Powering the black pill instead of the STM32F407). I've also tried powering the black pill through usb and connecting Discovery SWD Pin 1 -> Black Pill Vcc
I've updated the Discovery's ST-Link to the newest firmware.
Using the st-info utility, I'm able to detect the ST-Link on the Discovery board correctly, but st-info --descr either returns nothing or "unknown board".
When I set the black pill's jumpers to pull BOOT0 high, I can see the correct output from st-info --descr, but when I use Atollic TrueSTUDIO to upload the program to the black pill while BOOT0 is high, it uploads successfully but immediately loses the debug connection.
When BOOT0 is low, I can't upload at all.
What could I be doing wrong?
Regards
Gerrie
