2023-04-04 05:42 AM
I'm just starting to learn microcontrollers, so I have a question.
I have STM32F103C8T6 and STLINK V2 programmer.
Connected lines SWDIO, SWCLK, SWO(PB3) and RESET
In CUBE MX I choose "No Debug" or "Serial Wire" or "Trace Asynchrone SW" and in CUBE IDE with any choice (after flashing), there is debugging by registers and SWO
Why is it so done that debugging goes on, even if it is turned off in CUBE MX
In STM32 Utility also works, with debugging disabled
Pic
Solved! Go to Solution.
2023-04-04 06:03 AM
Welcome, @DMukh.2, to the community!
This is because the SWD interface is queried very briefly after a reset of the STM32. However, it is easy to forget this and then be surprised that the STM32 does not react when it has been set to STOP mode, for example. For this reason and for other reasons (pin assignment, etc.), it makes sense to always assign the SWD pins. If you use power safe modes, you can also use the setting Under Reset for the debugger, setting Reset behaviour.
For details on debug support, see RM0008, section 31.
Hope that helps?
Regards
/Peter
2023-04-04 06:03 AM
Welcome, @DMukh.2, to the community!
This is because the SWD interface is queried very briefly after a reset of the STM32. However, it is easy to forget this and then be surprised that the STM32 does not react when it has been set to STOP mode, for example. For this reason and for other reasons (pin assignment, etc.), it makes sense to always assign the SWD pins. If you use power safe modes, you can also use the setting Under Reset for the debugger, setting Reset behaviour.
For details on debug support, see RM0008, section 31.
Hope that helps?
Regards
/Peter