2025-12-10 11:58 PM
In a recent design I needed an additional pin and I configured the PA13 / SWDIO pin as a GPIO input.
All going fine, code works, but then this happened: After I program the chip in automatic mode and set the option byte rdp to 0xBB I can't connect again with the programmer. Programmer sais: No STM32 Target found...
I tried different modes and reset modes, no luck.
The readout protection alone is not the issue, I have been able to connect and reset this on other designs after it was set. The difference here is that the processor is using the SWDIO as an input when running. I thought this would not affect it as it should be available to the programmer directly after reset. The code without the readout protection set does not prevent me from connecting either. This must be the combination of both somehow.
Any smart ideas how to circumvent this and connect the programmer again?
Regards, Peter
P.S. I know you like to look at the schematic for a custom board, so I will attach a snippet of the relevant area
2025-12-11 12:48 AM
Pulling down the BOOT0 pin at power-on and connect to the system bootloader via a supported tool should still work.
In most cases the Cube Programmer and a serial line will do the trick.
Any (reversible) RDP setting active means you have to perform a mass erase.
> Any smart ideas how to circumvent this and connect the programmer again?
Not re-using the SWD pins.