cancel
Showing results for 
Search instead for 
Did you mean: 

Dividing flash sectors on stm32f746

q123w123e123qweqwe
Associate III

Hi,

Is there any way to divide flash sectors into smaller parts? I have to store data into the flash and want to be able to delete it when I want. Currently, I am using two sectors for that purpose and when I want to erase some data copying whole data in the buffer (located in ram) and write it to other sector delete sector one and write it again sector 1. But it takes too much time and there is no protection for power cut(while sectors copying from one to another before erasing other sectors.). So if was able to divide sectors it would be really easy and safer. I don't want to use another external EEPROM or flash.

4 REPLIES 4
berendi
Principal

Flash memory still does not work that way, nothing is changed in the last two days.

You still can't go below 32K on the STM32H7.

I know and have seen on the datasheet but I thought maybe there is another way or trick I can use. I can't be the only one who wants to store and change permanent data into flash.

berendi
Principal

Even if a million people wanted to overwrite a single byte in flash, it would not change how flash memory works. They are made that way. You might as well want to store data on a piece of cheese.

You can write to unprogrammed words (and look for the last byte which is not 0xFF at startup), or erase the whole sector, there is no magic trick to change that.

Ok thanks