cancel
Showing results for 
Search instead for 
Did you mean: 

How to correctly use ST-link/V2 with STM32L476 discovery board ?

pi lavi
Associate II
Posted on April 14, 2017 at 15:14

Hello,

Iam currently unable to connect to my STM32L476 Discovery board using an ST-Link.

I have removed jumpers from CN3, connected the cables correctly but the utility tool won't detect anything...

JP3 is ON, JP5 is on Idd OFF and JP6 is on 3V3.

Here are the connection between my ST-Link/V2 and my board :

PIN1 -> 3V3

PIN7 -> SWDIO

PIN9 -> SWCLK

PIN15 -> NRST

PIN20 -> GND

The STM32L476 discovery board is powered by an external supply (connected to 5V_I).

Here is what I get from STM32 ST-LINK Utility :

0690X00000603dqQAA.jpg0690X00000603lOQAQ.jpg

I got the error : 

ST-Link/V2 device detected

Target voltage detected: 3.252984

Driving NRST low

Error getting target IDCODE: if SWD, check SWD connection

Error (4) while initializing ST-Link in SWD mode

I tried every SWD frequencies possible.

I also powered Vapp (on discovery board) with 3.3V (not sure if I have to or not, so I tried both).

Thank you for your help.

#st-link #swd #stm32l476 #stm32
5 REPLIES 5
Posted on April 14, 2017 at 16:32

To the specific pins of the L476, or the SWD header from the onboard ST-LINK? The header isn't going to work.

Make sure NRST is disconnected from the onboard ST-LINK, may require a solder bridge being removed.

Why? Does the onboard ST-LINK not work?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on April 14, 2017 at 16:54

It's connected to the SWD header from the board, because specific PIN (PA13 and PA14) are note visible (there isn't anything to connect these pins). Why it isn't going to work ?

The on-board ST-link works, but I am planning to make my own elctronic card, based on the micro-processor on this discovery card. When producing card in huge quantites, code is not transferred via USB, but via JTAG or SWD. Then, I would like to be sure that programming via SWD works.

Thank you for your reply.

Posted on April 14, 2017 at 19:15

The SWD header is on the wrong side of the CN3 jumpers, review the schematic.

You'd want to connect SWDIO/SWCLK to the L476 side of the CN3 jumper pins

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on April 24, 2017 at 09:54

I'm sorry but I didn't understand what you said. What do I have to do to make this work ? How can I program using SWD ?

Posted on April 24, 2017 at 14:01

But can you read a basic schematic? I've told you that you are not connecting to the right pins, you pull off the CN3 jumps and the SWD header ISN'T connected to the target processor.

Imagine you are holding a piece of string at one end, you cut the string in half, but you are holding the wrong end of the string. Of that you are installing a motor on a boat, you want it attached to the back of the boat, not the front.

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