Skip to main content
Associate III
April 26, 2024
Solved

Is it possible to erase STM32c01x Memory in smaller units than the Page?

  • April 26, 2024
  • 2 replies
  • 1342 views

Hello, I am using STM32C011F4U6 MCU.

As I mentioned, I wonder if it is possible to do Erase in units smaller than Page.
The specification does not describe such a function, but is this function possible?

Best answer by Peter BENSCH

Flash erasure in STM32 is only possible in multiples of pages, it cannot performed in smaller chunks of memory. The RM0490 also describes this in detail, e.g. in section 3.3.6.

Hope that answers your question?

Regards
/Peter

2 replies

Peter BENSCH
Technical Moderator
April 26, 2024

Flash erasure in STM32 is only possible in multiples of pages, it cannot performed in smaller chunks of memory. The RM0490 also describes this in detail, e.g. in section 3.3.6.

Hope that answers your question?

Regards
/Peter

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.
Uwe Bonnes
Chief
April 26, 2024

You can  however "invalidate" already programmed chunks of 64 bits by writing 64-bits of all zero. 

Andrew Neil
Super User
April 26, 2024

@Uwe Bonnes wrote:

You can  however "invalidate" already programmed chunks of 64 bits by writing 64-bits of all zero. 


+1

@KenLee for more on this, see:

https://community.st.com/t5/stm32-mcus-embedded-software/issues-with-x-cube-eeprom/m-p/663034/highlight/true#M47011

(probably also worth reading the rest of that thread)

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.