In the STM32G031 do you need to set any pins a certain way to be able to reprogram the chip with ST-LINK or with the Bootloader?
I had PA13 and PA13 set as a GPIO. I was able to program it one time with both the ST-Link V2 Clone, a.k.a Blue Pill, and via the Bootloader program stm32flash (on SorceForge.net) using the UART.
Both would only work on a new chip. Once the chip was programmed neither one would work again on that chip.
I can understand that the ST-LINK probably needs PA14 (boot) to be set as SYS_SWCLK and PA13 needs to be SYS_SWDIO for the ST-LINK to work while it is running.
But I would have thought by using the bootloader and setting BOOT0 high before releasing (bringing it high) NRST (Reset) the chip would go directly to the Bootloader and be unaware of anything you set the BOOT0 pin to in the user code.
None of the bootloader documentation says anything about reserving any pins for any function that I have seen. If it is there then it needs to be clearer, because I do not see it.
What do I have to do to be able to reprogram the chip with the bootloader a second time? We want to be able to upload new firmware once installed without tearing the equipment apart.
