cancel
Showing results for 
Search instead for 
Did you mean: 

Help needed with SWD connection

Justin1
Senior

We are bringing up a new board and having troubles establishing SWD connection, I was reaching out seeking help with this.

  • Target - STM32F091RC
  • ICSP - ST-Link/V2
  • IDE - TrueSTUDIO

This is our first use of the ST-Link outside of Nucleo-64 board development and I was thinking it may be best to start there:

  • Board - NUCLEO-F091RC

When I hook the Nucleo-F091RC up to the external ST-Link/V2, I use the following wiring & apply 3.3V -

Config:

  • CN2 - Jumpers Removed
  • Vdd - 3.3V (CN6.4)

Board Wiring:

  • Vdd - CN6.2
  • Gnd - CN6.6
  • SWDIO - CN7.13 (PA13)
  • SWCLK - CN7.15 (PA14)
  • SWO - CN10.31 (PB3)
  • NRST - CN7.14

ICSP Wiring:

  • Vdd - p1
  • Gnd - p4
  • SWDIO - p7
  • SWCLK - p9
  • SWO - p13
  • NRST - p15

When I launch an existing project that works using the onboard ST-Link it now reports "a problem occurred", see attached. What is the issue here?

Hardware Setup:

0690X000006D76hQAC.jpg

Error Message:

0690X000006D76mQAC.png

Debugger Config:

0690X000006D76rQAC.png

1 ACCEPTED SOLUTION

Accepted Solutions
irinakim12
Associate II

0690X000006D76wQAC.jpg

St-link part(left Nucleo)	rest of Nucleo (right Nucleo)	signal
CN4 pin 2	CN7 pin 15	SWCLK
CN4 pin 3	CN7 pin 19	GND
CN4 pin 4	CN7 pin 13	SWDIO
CN4 pin 5	CN7 pin 14	NRST
JP1 left pin	CN7 pin 12	+3V3_ST_LINK

Programming and testing programs run entirely properly in this combination. Of course, CPU power supply can be solved in another way. Here is powered from 3.3V St-link, because it is so easy for me. For this test, in the right Nucleo it is open jumper CN12 (because not powered St-link bother NRST line), but in your situation it does not matter.

View solution in original post

3 REPLIES 3
irinakim12
Associate II

0690X000006D76wQAC.jpg

St-link part(left Nucleo)	rest of Nucleo (right Nucleo)	signal
CN4 pin 2	CN7 pin 15	SWCLK
CN4 pin 3	CN7 pin 19	GND
CN4 pin 4	CN7 pin 13	SWDIO
CN4 pin 5	CN7 pin 14	NRST
JP1 left pin	CN7 pin 12	+3V3_ST_LINK

Programming and testing programs run entirely properly in this combination. Of course, CPU power supply can be solved in another way. Here is powered from 3.3V St-link, because it is so easy for me. For this test, in the right Nucleo it is open jumper CN12 (because not powered St-link bother NRST line), but in your situation it does not matter.

Thanks Irana! I have two Nucleo-64’s and will try this in the morning, looking forward to testing this out 👌

Justin1
Senior

Goodness thank you Irana, your help and reference content was just what was needed. I have gathered our efforts together in a writeup, see attached for reference. Thank you much!! 😊