cancel
Showing results for 
Search instead for 
Did you mean: 

[SOLVED] Wiring diagram for connecting ST-LINK V2 directly to STM32F411RET6?

Zang Man
Associate III

Hi all - I have got a prototype working on the Nucleo-F411RE and I am now trying to design my own custom board. I ordered an STM32F411RET6 MCU with an adapter board and have tried to wire it up with the following configuration from the ST-LINK V2 official programmer:

ST-LINK ==> MCU

PIN1 ==> VDD

PIN7 ==> PIN46 (SWDIO - Pulled up to VDD with 1K RES)

PIN9 ==> PIN49 (SWCLK - Pulled down to GND with 1K RES)

PIN13 ==> PIN55 (SWO)

PIN15 ==> PIN7 (NRST)

PIN19 ==> VDD (3.3V)

PIN20 ==> GND

I have also connected all the VDD and VDDA pins on the MCU to VDD and all the GND and GNDA pins to GND.

But when I try to program to the MCU using TrueStuio, I get the error "No device found on target".

I've spent the last 5 hours trying to research this and get it to work with no luck, can someone please share a wiring diagram or tell me what I'm doing wrong? Thanks so much!

12 REPLIES 12
Uwe Bonnes
Principal II

Try without the pull resistors The STM32 pins already have appropriate pulls. Do not connect SWO and NRST as long as not really needed. Do not connect PIN19 if your target board has its own power , especially if target VDD is not 3.3 Volt. Try with the Stm32CubeProgrammer first. Does is read the target voltage?

Zang Man
Associate III

Thanks for your fast reply!

I tried without the pull resistors initially and it didn't work. Neither did it without connecting SWO and NRST. My target board is just the MCU in LQP64 on a breakout board so I need the ST-LINK to power it. I have not tried it with Stm32CubeProgrammer, will do so tomorrow. I tried to connect to it using both truestudio and using the ST-LINK utility tool, but it wouldn't even connect.

"No device found on target" == Your design not functional, chip not starting/running.

What about the VCAP pin(s) and capacitors? What voltage do you see there?

Make sure you've got the pin orientation correct.

Try using USART1 PA9/PA10, with BOOT0 pulled high, send a 0x7F character at 9600 8E1, check for 0x79 response.

Make sure your design pulls BOOT0 low for normal operation.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Uwe Bonnes
Principal II

Try your setup with some known working board.

I'm guessing it's the chip that isn't starting since I can't even connect to the MCU using the ST LINK utility. I can upgrade the firmware though, so the ST-LINK V2 should be fine. I will check the pin voltages later today. Good point on the pin orientation, I'll check that again as well.

Do I need to pull BOOT0 low or would the MCU do that by itself?

Like with the nucleo board after disconnecting the built-in programmer? Hmm, that's an idea, I'll see if that's doable. I've seen posts of folks doing it on the discovery board, but not on the nucleo yet.

>>Do I need to pull BOOT0 low or would the MCU do that by itself?

You need to have it pulled low to ensure proper operation and startup from FLASH.

I see - I'll give that a try now and see if it helps, thanks for your help! 🙂

I tried it out and it still doesn't recognise the device. When I connect with stm32cubeprogrammer, i get the following error when I hit connect:

20:30:53 : ST-LINK SN : 49FF6A068278535319481981

20:30:53 : ST-LINK FW : V2J33S7

20:30:53 : Voltage : 3.19V

20:30:53 : Error: No STM32 target found!

Here is my wiring schematic and a couple of pics of my setup.

I've been looking at the wiring diagram of the nucleo f411re and I think I'm matching it quite close. Just a few things that are missing on my setup:

  1. SWO and NRST are not connected
  2. I'm using 10uF instead of 4.7 uF on CAP1 and across the power rails. Also these are electrolytic capacitors and not ceramic (I'm hoping that doesn't affect too much!)
  3. I am not using a crystal. The nucleo board has an 8MHz crystal.
  4. I am powering the board using the ST-LINK V2 pin 19 which is marked as VDD (~3.2V)

Am I doing something fundamentally incorrect?

EDIT: Just checked the voltage on VCAP1, it's at 0.02V. Does that mean anything?