Skip to main content
Associate II
April 17, 2024
Solved

SWD program/debug on custom board

  • April 17, 2024
  • 2 replies
  • 3275 views

Hello everyone

I'll receive soon a custom board based on an STM32 microcontroller (still not sure about the specific part number) and I'll have to flash FW updates on it. A few questions about it:

1) There's a 4 pin header connector on the board (VCC, SWCLK, GND, SWO) and I have two STLink programmers (STLink V2 and V2/ISOL). Is this connection scheme correct? (Left header connector, right STLink 20 pin connector).

VCC -> 1

SWCLK -> 9

GND -> 3

SWO -> 13

2) Will this work fine even if I have no SWDIO pin on the header connector? 

Thank you very much in advanced

Nick

 

This topic has been closed for replies.
Best answer by Andrew Neil

@NDicostanzo wrote:

2) Will this work fine even if I have no SWDIO pin on the header connector?


No: you need SWDIO for programming!

It would also be wise to provide NRST on the programming connector - this can get you out of some "stuck" situations.

https://wiki.segger.com/SWO

https://wiki.segger.com/Target_Interface_SWD 

https://developer.arm.com/documentation/101636/0100/Debug-and-Trace/JTAG-SWD-Interface 

https://community.st.com/t5/stm32-mcus-products/stm32-mcu-choosing-and-programming/m-p/657314/highlight/true#M239894

 

#SWD #SWDConnector

2 replies

Andrew Neil
Andrew NeilBest answer
Super User
April 17, 2024

@NDicostanzo wrote:

2) Will this work fine even if I have no SWDIO pin on the header connector?


No: you need SWDIO for programming!

It would also be wise to provide NRST on the programming connector - this can get you out of some "stuck" situations.

https://wiki.segger.com/SWO

https://wiki.segger.com/Target_Interface_SWD 

https://developer.arm.com/documentation/101636/0100/Debug-and-Trace/JTAG-SWD-Interface 

https://community.st.com/t5/stm32-mcus-products/stm32-mcu-choosing-and-programming/m-p/657314/highlight/true#M239894

 

#SWD #SWDConnector

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.
Associate II
April 17, 2024

Thank you very much. This confirms my initial concerns.