cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect STM32F407G-DISC1 by SWD to JTrace Pro / JLink

DLlan.1
Associate II

Hello,

I have an STM32F407G-DISC1 evaluation board which I have been trying to connect to through SWD with a Segger JTrace Pro, but I haven't been able to connect to the board for some reason. I have been following a Segger provided document for the connections and have verified those connections using the user manual for the board. Still, every time I run the JLink commander to connect to the target I get the following message on repeat:

InitTarget() start
Can not attach to CPU. Trying connect under reset.
Connection to CPU via connect under reset failed
InitTarget() end

Followed by "Cannot connect to target"

I have triple-checked the connections to be correct, is there a register I have to write to in order to enable tracing or a solution I'm missing?

I've been trying to get it to work for a while.

1 ACCEPTED SOLUTION

Accepted Solutions
DLlan.1
Associate II

I solved it with Segger support, it turns out the pinout on the JTrace Pro was reversed, so all I had to do was reverse my connections this entire time. It wasn't intuitive though since all the diagrams for the pinout have the pins arranged according to where the bump on the connector is, and I was following that, but it wasn't the case in mine.

View solution in original post

6 REPLIES 6

From the pins on the CHIP, not the SWD header exporting the functionality via the ST-LINK.

The pair of ST-LINK jumpers have SWDIO and SWCLK on one side of the bridge

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

I got it to work finally, turns out that the pinout on my JTrace Pro was reversed.

I knew, it was at the bottom of the document I was following, but since it wasn't tested on the STM32F407 I didn't want to mess with the firmware. I solved it with Segger support eventually, turns out the pinout on the JTrace Pro 20 pin connector was reversed.

DLlan.1
Associate II

I solved it with Segger support, it turns out the pinout on the JTrace Pro was reversed, so all I had to do was reverse my connections this entire time. It wasn't intuitive though since all the diagrams for the pinout have the pins arranged according to where the bump on the connector is, and I was following that, but it wasn't the case in mine.

The STM32F4DISCOVERY (STM32F407G-DISC1) board is in the list of tested boards. ;)