cancel
Showing results for 
Search instead for 
Did you mean: 

Can't get SDW via ST-Link/v2 to work

vneff
Associate II
Posted on July 31, 2014 at 23:29

Hi,

I just received a new prototype with a STM32F215 processor and it is set up to use the SWD interface to initially flash the unit.

on the ST-Link/v2 I have connected:

pins 3,5 & 10 to gnd (3 & 5 to reduce noise)

pin 9 to SWDIO on the processor

pin 11 to SWCLK on the processor

I have verified the following on the processor:

The VDDs are at 3.3v

BOOT0 is pulled to ground

BOOT1 is floating

Vcap_1 & VCAP_2 are at ~ 1.2 v

NRST & RESET are high

There is a clock on OSC_IN

VBAT is connected to 3.3 v

In the STM32 ST-LINK Utility:

Utility version v3.3.0

USB Driver version v4.3.1.0

ST-Link CLI version V1.9.0

ST-Link version V2.J21.S4 STM32+STM8 Debugger

Settings:

SWD

Coneect Under Reset and tried Normal and tried Hot Plug

Enable debug in Low power mode, tried unselected

When connecting, I always get:

Can not connect to target!

Please select ''Connect Under Reset'' ....

or If you're trying to connect to an STM32W1xx ...

I verified that there seems to be activity on both the SWDIO & SWCLK lines when attempting to connect.

Any hints as to what further to check?

Thanks for any help!

Vance

#stm32f2xx-swd-st-link
5 REPLIES 5
stm32forum
Associate II
Posted on July 31, 2014 at 23:46

nope, Should be pin 7 and 9. Also connect Vcc (3.3V)

vneff
Associate II
Posted on August 01, 2014 at 01:10

Thanks for the response!

Actually, it was pins 7 & 9. Sorry for the typo.

I had thought the VCC connection was optional.  That is going to be difficult.  Very small board with all tiny parts.  I'll see what I can do and report back tomorrow.

Vance

vneff
Associate II
Posted on August 01, 2014 at 14:51

I made the connection between Vcc and pin 1 of the ST-Link/v2.  Still no joy.

any other ideas?

Vance

Posted on August 01, 2014 at 16:22

Voltages suggest the part orientation is correct.

Sure you don't have SWDIO/SWCLK switched around, or connected to the wrong pins on the IC? Time to dig into the schematic.

Can you pull BOOT0 High and check for USART1 (PA9/PA10) connectivity to the System Loader? ie RealTerm at 9600 8E1, sending 0x7F, seeing 0x79 response?

I perhaps would have wired up SWO and NRST, and used a standard header connector. VCC is semi-optional depending on if the JTAG/SWD pod has line drivers. Bonding pin 1 & 2 of the 20-pin JTAG header should be sufficient to resolve that.

NRST should not be driven high, or attached to VDD directly.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
vneff
Associate II
Posted on August 01, 2014 at 16:57

I'm very embarrassed to say, during one of my soldering events, I ended up connecting the the connector to the prototype upside down :(

I do have communications now!

As a follow up, Vcc apparently does need to be connected to the ST-Link/v2.

Thank you very much for your help!

Vance