Electronic – STM32 SWD Issue

stm32swd

Greeting,

I'm facing an issue while trying to program STM32L151C6 using STM32F4 Discovery board as programmer. What I did are the following:

  1. I removed CN3 jumpers from STM32F4 Discovery board page 14 in User Manual
  2. I connect NRST, SWDIO, GND, SWCLK, Vdd to my target STM32L151C6 SWD pins except SWO ( I kept it floating) as below:
    Pin:number CN2 (STM32L151C6)
    Pin:1 Vdd
    Pin:2 SWCLK (PA14)
    Pin:3 GND
    Pin:4 SWDIO (PA13)
    Pin:5 NRST (NRST)
    Pin:6 SWO (No Contact)
  3. I used STM32 ST-Link Utility V2.2.6 to test SWD.

The result is "Cannot connect to ST-Link"

I've attached the schematic for my circuit design.

I really appreciate your prompt help guys to facilitate this issue.

Best Answer

The resulting error message indicates, that your PC is unable to find the ST Link altogether, can you try to disconnect your board from the CN2 connector and try again?

You should get something like "No MCU found" then, if you still get "Cannot connect to ST-Link" it would seem like your ST-Link is damaged or your USB cable is broken (that happens sometimes).

Your connections seem fine - check if you have no solder bridges on your board, if there is a short somewhere maybe that prevents the ST-Link from working correctly.