cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H750VB page size for flash erase - is it 128K, and if so, are there ways to partially erase the flash for persistent data storage?

wb0gaz
Senior

I have application that fits comfortably in 128K bytes and has some persistent storage (data tables that are occasionally written by the application journaling-style, and occasionally a need to erase some of the data to accommodate more

Here is my question - the STM32H750VB shows 128K flash, and in the datasheet (table 51) I see:

tERASE128KB Sector (128 KB) erase time...

That suggests to me that I can't use the device flash memory for persistent data storage, as erasing some of the flash would also erase any software resident in the same flash memory (I don't plan to use any external flash, EEPROM or RAM.)

Am I missing something in the way this device handles flash erase?

Thanks!

3 REPLIES 3
MM..1
Chief II

As you write your part have only one sector and this can be erased only fully.

Then if your code is placed on first part for example 32k then from this start you can append any data writes by word etc. When memory is full you need copy to RAM erase and write back...without lost power

GoodLuck

wb0gaz
Senior

Thank you, MM.. 1, I understand. I have not yet encountered a MCU where the RAM is larger than the flash memory. Of course I could cache the contents of flash in RAM, make the needed corrections, and write it back, so there is no problem, I was just not sure if I was missing some feature in the definition of the part.

Thanks again!

Dave

TDK
Guru

> Am I missing something in the way this device handles flash erase?

This particular chip has only a single sector, so you can't use the flash as nonvolatile data storage. Most chips are not like this and the flash is made up of many individual sectors/pages which can be erased independently. From the reference manual:

Note: On STM32H750xB, bank 2 is not available and bank 1 contains only one 128 Kbyte sector

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