cancel
Showing results for 
Search instead for 
Did you mean: 

SWD interface pins set as GPIO output lines.

Jacek Pieczaba
Associate II

Hello,

Please apologize if I am asking for trivial question but I have following problem. I have set in the STM32CubeMX pins which are used for SWD ( I am using th STM32F103CBT6 ) as an output pins. When I compile the software and program the micro looks that is working but I have lost access via debugger to MCU :(. Could you be so kind and help me to understand how to proceed in order to get back SWD capability.

Thank you very much in advance

With Best Regards,

Jacek

This discussion is locked. Please start a new topic to ask your question.
3 REPLIES 3
AvaTar
Lead

> ... the micro looks that is working but I have lost access via debugger to MCU :(

That's normal - you can't have your cake, and eat it at the same time.

Using the BOOT0/BOOT1 pins, get into the system bootloader and erase the flash. I think the FlashLoaderDemonstrator supports this functionality, usually over a UART line.

If you can use other GPIO pins for your application, better avoid re-using the debug pins ...

Jacek Pieczaba
Associate II

Thank you very much for quick suggestion. I will test it shortly and let you know.. Really appreciate

Jacek

Jacek Pieczaba
Associate II

Hello I was trying this but as you describe but no success. What I did I follow the suggestion from my friend and use the ST-Link Utility and change the setting on Target->Settings to mode to Connect under Reset. After that I was able to get access to the MCU and erase wrong SW.

Thanks a lot

Jacek