Skip to main content
Patrick Morwald
Associate III
March 22, 2018
Question

JTAG connection to STM32F407 with ST-Link V2 is not working

  • March 22, 2018
  • 3 replies
  • 1674 views

Posted on March 22, 2018 at 11:47

I am trying to debug my STM32F407 based board with the ST-LinkV2 adapter. It works fine when i use SWD, but i cannot get a JTAG connection.

Here is the error i get when trying to connect via JTAG:

Wrong device detected

Open On-Chip Debugger 0.10.0-dev-00007-g58350bc-dirty (2018-01-08-12:20)

Licensed under GNU GPL v2

For bug reports, read

http://openocd.org/doc/doxygen/html/bugs.html

srst_only separate srst_nogate srst_open_drain connect_assert_srst

Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD

adapter_nsrst_delay: 100

adapter speed: 1125 kHz

Info : tcl server disabled

Info : telnet server disabled

Info : clock speed 1125 kHz

Info : STLINK v2 JTAG v29 API v2 SWIM v7 VID 0x0483 PID 0x3748

Info : vid/pid are not identical: 0x0483/0x374B 0x0483/0x3748

Info : using stlink api v2

Info : Target voltage: 3.212598

Error: init mode failed (unable to connect to the target)

in procedure 'init'

in procedure 'ocd_bouncer'

I connected my ST-LinkV2 to the STM32F407VGTx (LQFP100) in the following way:

ST-Link P1 (VAPP) -> STM32 VDD

ST-Link P6 (GND) -> STM32 GND

ST-Link P5 (JTDO) -> STM32 PA15 (JTDI)

ST-Link P13 (JTDI) -> STM32 PB3 (JTDO)

ST-Link P7 (JTMS) -> STM32 PA13 (JTMS)

ST-Link P9 (JTCK) -> STM32 PA14 (JTCK)

But i cannot connect to my processor, neither with St-Link utility nor can i start a debug session with SW4STM32 IDE.

I use 1,25 MHz JTAG since i think thats the maximum the St-Link V2 supports?

Please help.

This topic has been closed for replies.

3 replies

Patrick Morwald
Associate III
March 29, 2018
Posted on March 29, 2018 at 15:57

Bump. This is an important question for us.

Andrew Neil
Super User
March 29, 2018
Posted on March 29, 2018 at 17:58

Can you connect using the 

http://www.st.com/en/development-tools/stsw-link004.html

  ?

You should try with this first - to see it it's a fundamental issue, or just a problem with the 

SW4STM32 IDE ...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Patrick Morwald
Associate III
March 29, 2018
Posted on March 29, 2018 at 18:11

Hi,

thanks for the answer but i tried already.

Bruno Conceição
Associate II
January 24, 2019

Hi Patrick,

did you found what the problem was? I'm facing the same issue...

Thanks,