2025-05-22 1:20 AM - last edited on 2025-05-22 1:33 AM by Andrew Neil
Moved from Feedback forum.
The Feedback forum is for feedback about the forum itself - not product questions.
Hello! During project debugging i encountered with follow situation. I have a led connected to PB3 pin (configured as output push-pull with low level by default) on STM32F103 and it turns on during debugger connecting and programming (i program empty flash) process and before the main program entering. I full erased flash then with STM32CubeProgrammer, but PB3 still raises high while debugger(ST-Link V2) is connected.
After power toggling i downloaded under IAR debug with st-link other firmware and the pin behaves as expected (stays low).
I also generated empty project with CubeMx (only external oscillator and SWD enabled) to see how PB3 would behave. After IAR debug session started it stays low. So, i suppose the problem is in firmware, but i can't understand where i should search it. All projects are generated in CubeMx 6.13 and debugged with IAR 9.60, HAL drivers version is V1.8.5
2025-05-22 1:36 AM
Welcome to the forum.
Please see How to write your question to maximize your chances to find a solution for best results; in particular:
2025-05-22 3:56 AM
PB3 is SWO by default. Makes sense that it may not be idle.
Once you set it to output, it should behave as an output. With flash erased, it will remain as SWO.