2022-07-21 11:44 AM
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.
Solved! Go to Solution.
2022-07-22 07:37 AM
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.
2022-07-21 12:48 PM
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
2022-07-21 02:22 PM
Just in case you don't know:
https://www.segger.com/products/debug-probes/j-link/models/other-j-links/st-link-on-board/
2022-07-22 07:33 AM
I got it to work finally, turns out that the pinout on my JTrace Pro was reversed.
2022-07-22 07:35 AM
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.
2022-07-22 07:37 AM
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.
2022-07-24 03:02 AM
The STM32F4DISCOVERY (STM32F407G-DISC1) board is in the list of tested boards. ;)