5 years, 3 months ago.

Reassign flashing pins SWDIO and SWCLK to GPIO

Hello, I am using a custom board with a STM32L031 on it (20 pins). The issue is that I have limited number of pins and I have to reuse the 2 pins dedicated to flashing SWDIO and SWCLK (PA_14 and PA_13) as GPIOs. The problem is that if I do that, I can't connect to the microcontroller anymore for flashing. The ST-link V2 IDE is saying to try to connect under reset but no luck.

Is the only way to add a delay before the pins reassignment so that I can connect to the microcontroller? Is there another way?

Thanks! Claudio

1 Answer

5 years, 3 months ago.

Hi Claudio,

I have two advice hope they would help. 1. Use a jumper or UART to configure the pin assignment. 2. Before programming, entering into boot mode.

Regards, Desmond