Skip to main content
Visitor II
April 16, 2019
Question

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

  • April 16, 2019
  • 6 replies
  • 10312 views

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!

    This topic has been closed for replies.

    6 replies

    Graduate II
    April 16, 2019

    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 ManAuthor
    Visitor II
    April 16, 2019

    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.

    Graduate II
    April 16, 2019

    "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.

    Zang ManAuthor
    Visitor II
    April 16, 2019

    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?

    Explorer II
    April 16, 2019

    >>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.

    Graduate II
    April 16, 2019

    Try your setup with some known working board.

    Zang ManAuthor
    Visitor II
    April 16, 2019

    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.

    Zang ManAuthor
    Visitor II
    April 18, 2019

    Welp! Noob mistake - for some reason I assume that Pin 1 starts from the top left when the text is upright. But it's actually at the bottom left. A grand total of 8 hours wasted trying to debug this. Oh well, something learned I guess. It connects fine now although I can't get USB working just yet. Might be a timing thing, but I'm getting closer.

    Thanks all for your help, much appreciated! :)

    Visitor II
    June 28, 2019

    Did you make it work?

    Zang ManAuthor
    Visitor II
    July 1, 2019

    Yup - it worked. It wasn't working because I mistook pin 1. Otherwise the wiring diagram worked. I think it also worked without having to connect SWO and NRST.