2026-02-03 8:28 AM - last edited on 2026-02-03 8:31 AM by Andrew Neil
Code is written using stm32CubeMX. Connecting with stmlink V3 Minie.
Executing step by step, it appears that debug fails (lose connection) when executing debug_init. In fact debug_init creates the problem when programming pa13.
When removing the initialization of PA13 and PA14 in debug init, things seems to work but I have no idea of potential side effect.
An recommendation?
2026-02-03 8:38 AM
Please include the IOC that generates the problematic code.
2026-02-03 8:39 AM - edited 2026-02-03 8:40 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, please give details of your setup.
@GYV wrote:debug fails (lose connection) when executing debug_init. In fact debug_init creates the problem when programming pa13.
Please show that code. See: How to insert source code
PA13 & PA14 carry the SWD signals (ie, the signals the debugger uses to communicate) - so messing with them will break the debugger connection!
https://www.st.com/resource/en/datasheet/stm32wb55rg.pdf#page=65
via: https://www.st.com/en/microcontrollers-microprocessors/stm32wb55rg.html#documentation