Skip to main content
Associate
July 6, 2025
Question

problem with stm32cubeprogrammer full chip erase.

  • July 6, 2025
  • 4 replies
  • 760 views

Hello
I have completed the verification of read/write/sector erase/mass erase operations in the firmware based on the main() function.
I have created an external loader by writing link.ld, Loader_src.c and Dev_inf.c and tested the operation. Read/write/sector erase works fine. However, only mass erase does not work.

5.png

6.png

The code for the MaseErase(void) function is below, but just in case, I commented out the content and returned only LOADER_OK;, but the same symptom occurred.

3.png4.png

STM32CubeProgrammer 2.19, 2.18 versions are the same, and the message of 2.17 is successful, but the 0x90000000 area is not cleared.

Is there a problem with the STM32CubeProgrammer program?
Or which part of my source code should I modify?



STM32CubeIDE 1.17.0
STM32H747 및 STM32H743
MT25QL512A


4 replies

MBrau.7
Associate II
July 21, 2025

I have recognized the same problem. I have created an external loader for a MT25QL512ABB NOR flash on a STM32H755 controller via IAR Embedded Workbench IDE. Read/Write/EraseSector/MassErase are working as expected in my test code. If I include the loader in CubeProgrammer V.2.20, I get the same error code as @bsPark for the MassErase function.

I did another test for an existing External Loader with the STM32H747 Discovery Board. The MassErase function of the existing loader in the CubeProgrammer works as expected. Then I created the corresponding project myself. Read/Write/EraseSector work without any problems. When MassErase is called, the familiar error message appears.

Have you been able to find out anything @bsPark?
Is there perhaps a known error that I have not been able to find yet?

(https://github.com/STMicroelectronics/stm32-external-loader/tree/main/STM32H7x_boards/MT25TL01G_STM32H747I-DISCO)

Maryem
Technical Moderator
July 21, 2025

Hello,

 

Could you please check on your side that the external flash loader filename exactly matches the name declared in the flasher ?

 

Maryem.

sk-st
Associate III
November 18, 2025

I had this problem too, with a custom external loader.

 

All functions (read, write, sector erase) work, but not mass erase.

After your hint i  adjusted the filename of the EL to the string declared in the file Dev_Inf.c

in the StorageInfo structure.

Now mass erase works.

 

Some suggestions for future CubeMXProgrammer release:

- Mass erase should work when the filename differs from string in StorageInfo struct.

- Documentaion update: Verify while writing is no longer supported in newer versions so the

CheckSum() and Verify () functions in the EL are useless an can be removed.

 

MBrau.7
Associate II
November 19, 2025

@sk-st Thanks for sharing your infos

Maryem
Technical Moderator
August 26, 2025

Hello @bsPark, hello @MBrau.7,

 

I wanted to kindly follow up to check if there is any update on this issue. Were you able to resolve it by checking the filename as suggested?

 

Maryem.

MBrau.7
Associate II
September 23, 2025

Hi @Maryem 

sorry for my late reply. I double checked the file names you mentioned: they to match. 
I temporarily accepted the situation by erasing all sectors instead of performing a mass erase.