2022-02-04 08:45 AM
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!
2022-02-04 09:37 AM
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
2022-02-04 10:27 AM
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
2022-02-04 05:56 PM
> 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