2025-01-07 05:32 AM
Hi,
I am using STM32H503 controller and wanted to understand if SWDIO pin can be used to flash the code.
Solved! Go to Solution.
2025-01-07 06:50 AM - edited 2025-01-07 06:51 AM
Not on its own.
The SWD interface consists of two pins:
You need both plus, of course, GND.
https://developer.arm.com/documentation/101636/0100/Debug-and-Trace/JTAG-SWD-Interface
https://learn.sparkfun.com/tutorials/arm-programming/jtag-and-swd
https://kb.segger.com/Target_Interface_SWD
Although not always strictly necessary, you should also include NRST in your debugger/programmer connection - it can get you out of some "bricked" states.
In addition, most debug/programming probes (eg, ST-Link) also want a connection to the target's VDD line.
See the documentation for your debug/programming probe.
See Application note AN5711, Getting started with STM32H5 MCU hardware development:
https://www.st.com/resource/en/application_note/an5711-getting-started-with-stm32h5-mcu-hardware-development-stmicroelectronics.pdf#page=27
2025-01-07 06:44 AM
Yes, the SWD connection is the typical way code is flashed using STM32CubeProgrammer and an ST-Link programmer.
2025-01-07 06:50 AM - edited 2025-01-07 06:51 AM
Not on its own.
The SWD interface consists of two pins:
You need both plus, of course, GND.
https://developer.arm.com/documentation/101636/0100/Debug-and-Trace/JTAG-SWD-Interface
https://learn.sparkfun.com/tutorials/arm-programming/jtag-and-swd
https://kb.segger.com/Target_Interface_SWD
Although not always strictly necessary, you should also include NRST in your debugger/programmer connection - it can get you out of some "bricked" states.
In addition, most debug/programming probes (eg, ST-Link) also want a connection to the target's VDD line.
See the documentation for your debug/programming probe.
See Application note AN5711, Getting started with STM32H5 MCU hardware development:
https://www.st.com/resource/en/application_note/an5711-getting-started-with-stm32h5-mcu-hardware-development-stmicroelectronics.pdf#page=27
2025-01-07 09:21 PM
Thank you!
2025-01-08 01:07 AM
If that's answered your question, please mark the solution:
https://community.st.com/t5/community-guidelines/help-others-to-solve-their-issues/ta-p/575256
2025-01-08 03:54 AM