cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to flash/erase STM32G030F6P6

tachyon
Associate

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?

 

1 REPLY 1
AScha.3
Super User

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:

AScha3_0-1765744363177.png

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:

https://community.st.com/t5/stm32-mcus-products/stm32c011j6m6-so8-package-trying-reconfigure-pin-8-from-stlink/td-p/864303

 

 

If you feel a post has answered your question, please click "Accept as Solution".