Skip to main content
Associate II
September 24, 2026
Question

Full Chip Erase using CubeProgrammer

Hello Community :)

 

We are using STM32N657 series MCU and flash MPN : S25FS512SDSBHV213, The flash supports two erase mode Hybrid (default) and Uniform erase. 
When we flash/overwrite a new binary it does not work properly, even the Full chip erase is enabled 


What we have to do for image to be working we have to go to erase external memory section and have to perform full chip erase and it takes roughly 5 mins to erase,

​​​​​Without this it is not working, what we want, is there any option in the cubeprogrammer to erase the flash while/before programming ? other than this

2 replies

Aziz BRIGUI
ST Technical Moderator
September 24, 2026

Hi ​@Harsh_Bhavsar,

STM32CubeProgrammer erases the flash before programming. There’s an option to skip this erase here:

Also, checking “Full Chip erase” has no impact since you’re not using Automatic mode.

What I suggest here is to check your sector erase API and its name (Check that it’s working for 1 or 2 random sectors at a time and check that it’s named exactly “SectorErase”).

Hope this helps,

Aziz

In order 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.
Associate II
September 29, 2026

Hello Aziz, 

Thank you for the response,  and sorry for the late reply, i will surely check as per your recommendations.

Thanks,
Harsh