cancel
Showing results for 
Search instead for 
Did you mean: 

Can't re-program STM32G030C8

mark4444az
Associate II

I have tried everything I can think of to get part to program, I still get this:

The elf loader Sector Erase function fails.
Memory-Loader error
Error occured during erase operation!
Programming error @ 0x08000000!

I have tried STL CLI, JFlash-lite, JFlash, STM32Cubeprogrammer, always the same thng.

If anyone has any ideas I would be grateful.

1 ACCEPTED SOLUTION

Accepted Solutions
mark4444az
Associate II

Found this:

  1. Make PCROP_RDP checked, enable RDP level 1
  2. Program option bytes.
  3. Disable RDP.
  4. MCU should be erased to 0xFFFFFFFF

That actually worked!  Found it on another thread. 

View solution in original post

6 REPLIES 6
RomainR.
ST Employee

Hello @mark4444az 

Is it a custom board? If yes do you have checked SWD connection?

If you are able to etablish a SWD connection with STM32CubeProgrammer, check option byte if the device is not protected (RDP ?)

BR

Romain

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

mark4444az
Associate II

I am using an STLink-V3Minie. I can look at the Option Bytes:

 

 

mark4444az_1-1689775041465.png

The Read/Write Protection is not checked so it is not on. Further, I have tried the JLinkSTM32 executable to reset options back to factory settings, said that  worked.

I do not see 

mark4444az
Associate II

I still am having no luck on programming.

AScha.3
Chief III

did you try loading a bin or hex file ?

+ another chip ? maybe this one has a "problem" .

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

Yes, replaced the processor and programmed with gui and it's ok. The issue appears to be in my script file:

ST-LINK_CLI.exe -c SN=002000283431511737393330 -p RAD3.hex 0x08000000 -v -rst

When I use that it seems to brick the uP.

mark4444az
Associate II

Found this:

  1. Make PCROP_RDP checked, enable RDP level 1
  2. Program option bytes.
  3. Disable RDP.
  4. MCU should be erased to 0xFFFFFFFF

That actually worked!  Found it on another thread.