2
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ Does your STM32F4 Discovery work with the CN3 jumpers in with your current software setup? It should be able to detect the built-in STM32F micro. \$\endgroup\$ – Zuofu Mar 18 '15 at 1:15
  • \$\begingroup\$ Yes indeed I've tested it. but I couldn't get it to work with external MCU (STM32L151C6) \$\endgroup\$ – user3124017 Mar 18 '15 at 6:25
  • \$\begingroup\$ Did you apply power to the external board? \$\endgroup\$ – Turbo J Mar 18 '15 at 10:09
  • \$\begingroup\$ Yes sure I did. I checked even for solder bridges nothing is there. But sometime I got shorts between the Vcc pin to GND pin in my PCB during active state of the IC it's very strange \$\endgroup\$ – user3124017 Mar 18 '15 at 10:24
2
\$\begingroup\$

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.

\$\endgroup\$
0
\$\begingroup\$

First of all I would like to thank each one of you guys. I found the problem which is related to the STM32F4Discovery board I was trying to use it as a programmer. but there were issues not easy to grasp in order to modify the disco board.

What i've done was that I bought a new ST-Link-V2 and it works like charm :) without any changes to the circuit design.

Cheers, Waleed

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.