cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 not working with ST-LINK V2

MihirJ
Visitor

Hello everyone
It's my first time messing around with STM32 microcontrollers
A few days back I got a black pill (STM32F401CCU6 - https://robu.in/product/stm32f401ccu6-minimum-system-board-microcomputer-stm32-arm-core-board/) and an ST-Link V2. The black pill came with 3 buttons, namely (KEY, NRST, BOOT0) and a USB-C Port. Since the ST-Link was arriving later, I connected the black pill to my PC through USB-C. The PWR LED on the black pill turned on. I pressed down the boot0 button, clicked the nrst button and then released the boot0 button to enter the dfu mode (according to the guides I saw online) I fired up the Arduino IDE, wrote a tiny blink program, and it worked.
A few days later, I got the ST-Link V2. I connected the SWCLK, SWDIO, GND and 3.3V terminals to the black pill as I found online, and connected the ST-Link to my computer. The LED inside the ST-Link turns on, but the PWR LED on the black pill doesn't turn on. The ST-Link is detected by the STM32CubeIDE, I also did a firmware upgrade as the software suggested, but it still couldn't detect the black pill.
The black pill still works fine through USB-C.

Is this a connection issue between the ST-Link and the black pill? Or do I have to use the buttons to reconfigure/ reset the black pill to make it work with the ST-Link?

 

The ST-Link I have is a clone, something like this - https://robu.in/product/st-link-v2-programmer-for-stm8-and-stm32/?gad_source=1

1 REPLY 1
AScha.3
Chief II

Hi,

>but the PWR LED on the black pill doesn't turn on.

So seems, you give no power to it. And no, no button press needed with st-link connection.

The st-linkV2 (clone) has power output, so connect:

- gnd

- swd

- swc

- 3v3 -> 3v on board ; check: is on board gnd--3v  = about 3v3 ?

+ check with CubeProgrammer connection to cpu; 

set connection mode : normal, software reset.

If you feel a post has answered your question, please click "Accept as Solution".