2025-12-14 7:29 AM
Hi,
I am unable to flash or erase two of my STM32G030F6P6 boards. The issue started after I tried to configure the PA14 pin as GPIO_EXTI14 in CubeMX. (on two boards)
After flashing the binary I was not able flash the MCU anymore. I get the error "Error in initializing ST-LINK device.".
In STM32CubeProgrammer I get the error "No STM32 target found! If your product embeds Debug Authetication, please perform a discovery using Debug Authentication" when pressing "Connect" (I have no debug Authentication enabled).
Then I tried enabling RST while pressing "Connect" in CubeProgrammer. I am then able to connect. But if I try to erase the flash (Full Chip Erase) I get the error "Error: Mass erase operation failed. Please verify flash protection". I have no flash protection enabled.
I am on Linux using VSCode for development.
Any suggestions?
2025-12-14 12:29 PM - edited 2025-12-14 12:35 PM
Hi,
use CubeProgrammer and check/set the flash unprotected , then do full erase chip.
And maybe need setting "under hardware reset" .
(You have genuine st-link ? If not, the "stick" V2 no hard reset possible.)
+
about PA14:
You cannot expect to use/set the pin to any function you like , but it still can serve the swd/swc degug or flash functions.
see here, how to do it: