cancel
Showing results for 
Search instead for 
Did you mean: 

ST-LINK V2 does not connect to STM32F103

andrew239955
Associate II
Posted on March 31, 2015 at 13:21

Hello!

I have strange error while attempting to connect ST-LIK Utility to MCU.

Trace log:

W at 0xe000edf0: 0xa05f0000

cErrLog::SetLogTraceOn

STLinkUSBDriver.dll loaded

ST-Link/V2 device detected

Target voltage detected: 1.557480

Driving NRST low

W at 0xe000edf0: 0xa05f0003

R at 0xe000edf0: 0x02010001

R at 0xe000edf0: 0x02010001

Target is held under reset

Activating vector catch system

W at 0xe000edfc: 0x00000001

R at 0xe000edf0: 0x02010001

R at 0xe000edf0: 0x02010001

Driving NRST high

R at 0xe000edf0: 0x02030003

R at 0xe000edf0: 0x00030003

W regId 16: 0x01000000

W at 0xe000edfc: 0x00000000

R at 0xe000ed00: 0x00000031

R at 0xe0042000: 0x00000014

R at 0xe0042000: 0x00000014

R at 0x1ffff7e0: 0x00000000

R at 0xe0042008: 0x00000000

W at 0xe0042008: 0x00001800

R at 0xe000ed00: 0x00000031

R at 0xe0042000: 0x00000014

R at 0xe0042000: 0x00000014

R at 0x1ffff7e0: 0x00000000

R at 0xe000edf0: 0x00030003

R at 0xe000edf0: 0x00030003

Error (0x17) after target cmd F2 3E 00 00 00 00 00 00 00 00

Error (19) in ReadMemory_32Bit (768 bytes from 0x8000000)

Error (0x12) after target cmd F2 36 F0 ED 00 E0 00 00 00 00

W at 0xe000edf0: 0xa05f0000

Error (0x12) after target cmd F2 35 F0 ED 00 E0 00 00 5F A0

Error repeats on several MCUs. Firmvare version of ST-LNK V2.J23.S4.

This debugger works with STM8 correctly.

In what could be

problem?

#st-lik-utility
7 REPLIES 7
Posted on April 01, 2015 at 00:38

In what could be

problem?

Your board, how you have the STM32 connected, the mode you're using to communicate with the chip?

Perhaps the problem is at the other end of the cable? Not much to work with here.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
andrew239955
Associate II
Posted on April 01, 2015 at 09:50

Your board, how you have the STM32 connected, the mode you're using to communicate with the chip?

I have custom board with MCU and power supply components only. I'm trying to connect to board via SWD using SWDIO, SWCLK, GND, NRST pins. BOOT0 pin is set to GND. Target is detected only if HotPlug mode is selected and Frequency is 1,8 or 4,0 MHz. In this mode chip is detecting, but if you click OK button, an error ''Could no connect to device'' appears.

I tried

several combinations

of parameters, and result is between ''No device detected'' to ''Could no connect to device''.
LaurentL
ST Employee
Posted on April 01, 2015 at 10:44

Hello,

What is the supply voltage of your STM32 ?

I suppose you didn't connect your VDD to the ST-Link ?

=> ''Target voltage detected: 1.557480''

Connect VDD (Vapp) to input pin 1 of ST-Link v2 20 pins connector.

Check all connections to ST-Link and all STM32 supplies first.

You should better activate the mode ''Connect under reset'' if you mess with the SWD pins in your appli for example.

Do you have an external Reset device alo connected on Reset pin ?

Rgds,

Laurent

andrew239955
Associate II
Posted on April 02, 2015 at 08:40

Thanks!

Really, it works with connected VDD pins of ST-LINK and VDD bus of board. It is so strange for me.
rpoli9
Associate
Posted on April 06, 2015 at 21:46

I have similar situation, stmf103re, st-link firmware v2j23s4,  custom board, target detection fail, and voltage detection fail, connected only swdio, swclk, gnd, and vdd, nrst connected with pull-up (100k), vdd on st-link is connected to pin 1 (tryed also on pin 2).

Connection checked, seems all ok, cable from st-link to board are short. Signal from the st-link pins are connected directly to the f103, no other connections

same connection on another custom board (with stm32f407) work well

Posted on April 06, 2015 at 22:26

Well that would seem to indicate an issue with the design or construction then, wouldn't it?

Things like power, on both digital and analogue sides. Reset clamped low, or clamped high. Solder shorts, part orientation. Pin ordering/mirroring on the JTAG connector side.

The external ST-LINK/V2 derives power for it's logic buffers from the target system.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
rpoli9
Associate
Posted on April 07, 2015 at 19:23

I checked, also no shorts, for design.. swclk=a14, swdio=a13, boot0=pulldown (with 20k), boot1=pulldown (100k), power is correctly 3.3v, pin orientation, first moment i have doubt becouse the chip have 2 round holes, 1 more small and more concave, i looked internet and found that the small is the reference, also checked with ground pin the orientation (ground plane of the chip is shared with all the ground pin), and i'm sure is correct, st-link also is correctly connected to the chip, same connection on the 2nd board with stm32f407, and is functional, changed also the chip with another, same situation. i not know what to think more, no ideas... :(