Jackob2001
Junior Member level 1
I do have a a couple of question regarding the SWD in STM32 :
- How do I program the STM32 when I configure SWDIO and SWCLK into GPIO ?
- Why when I have SWDIO and SWCLK and I send code from CubeIDE into STM32 the MCU is set into RESET mode ? It happens in my Nucleo and in my Custom board that uses only SWDIO, SWCLK and GND.
- How unprogrammed STM32 (no program in flash) in every MCU works when it does not have configured any pins because it is fresh unprogrammed STM32 out of the box so how it has SWD pins when it has no program in it ?
- Is it still possible to debug STM32 when I have SWDIO and SWCLK as GPIO during the RESET ? I've heard it resets the GPIO pins into SWD but only after I UNRESET the button but then the Flash is running.
- When I have unprogrammed STM32 and it was powered on, then I somehow could still program it using SWD or JTAG. How it works ? Why I could program the clear STM32 ?
- It is powered on I can program using SWD or JTAG even though I haven't picked it in STMCubeIDE, after RESET it says SWD is set no matter what but I could still program it using JTAG. I am confused in so many levels.
This isn't for specific MCU, I just noticed in my custom board with STM32 or with Nucleo that SWD works in a way I don't understand.
I couldn't find info about it in Reference Manual or in Datasheet so maybe somebody know the answer ?
If there is any information needed I will help to give info as much as I can, let me know please.
- How do I program the STM32 when I configure SWDIO and SWCLK into GPIO ?
- Why when I have SWDIO and SWCLK and I send code from CubeIDE into STM32 the MCU is set into RESET mode ? It happens in my Nucleo and in my Custom board that uses only SWDIO, SWCLK and GND.
- How unprogrammed STM32 (no program in flash) in every MCU works when it does not have configured any pins because it is fresh unprogrammed STM32 out of the box so how it has SWD pins when it has no program in it ?
- Is it still possible to debug STM32 when I have SWDIO and SWCLK as GPIO during the RESET ? I've heard it resets the GPIO pins into SWD but only after I UNRESET the button but then the Flash is running.
- When I have unprogrammed STM32 and it was powered on, then I somehow could still program it using SWD or JTAG. How it works ? Why I could program the clear STM32 ?
- It is powered on I can program using SWD or JTAG even though I haven't picked it in STMCubeIDE, after RESET it says SWD is set no matter what but I could still program it using JTAG. I am confused in so many levels.
This isn't for specific MCU, I just noticed in my custom board with STM32 or with Nucleo that SWD works in a way I don't understand.
I couldn't find info about it in Reference Manual or in Datasheet so maybe somebody know the answer ?
If there is any information needed I will help to give info as much as I can, let me know please.
Last edited: