2016-03-26 01:21 PM
If I understand right, to program FLASH, I have first to erase all page. Even if I want to store only one word of data. Is that true?
But page erasing is very slow - about 20 ms regarding to datasheet. This is not acceptable for our application where a whole program loop take about 10 us and this FLASH programming (storing of one word) should occur quite often.Is there any other way to store data in a non-volatile memory, which would be faster? Is it possible to store data without erasing a page each time?Thanks2016-03-26 01:44 PM
I must say that, becose it isn't your first question about this. You are doing it wrong.
very ofter writing to flash? vary bad idea. You can pre erase flash. And store data to all cells. Page then will be erase ones per several writes. But propably you you project assumption are wrong. Use cpu with sleep mode, use baterry backap (supercap).2016-03-26 04:37 PM
The flash cells must be erased before reuse, but you need to move beyond writing a single word, this is just wrong headed. Even if you have to write a byte or small structure, the way this is done is to journal it over a whole sector/page/block. The memory has finite cycles, 100K for the STM32's as I recall.
Use the BKPRAM to store things you want saved, and that runs at bus speeds. If you need EEPROM or FRAM you will need to add it externally. The size/structure of these memories is not conducive to the same processes as high speed logic, which is why you typically don't see them mixed these days.2016-03-27 06:13 AM
>The flash cells must be erased before reuse, but you need to move beyond writing a single word, this is just wrong headed. Even if you have to write a byte or small structure, the way this is done is to journal it over a whole sector/page/block. The memory has finite cycles, 100K for the STM32's as I recall.
Flash, using the mentioned block sizes, already consumes most of the die space. Having smaller block sizes would increase area requirements even more. Other vendors (e.g. Microchip) has implemented some Flash with single-byte access (erase/program), calling it ''EEPROM''. Usual size is 0.5 ... 8kByte, for data usage. Basically, it is the same technology, trimmed for higher data retention and erase/program cycle count, and higher complexity, and higher costs.> If you need EEPROM or FRAM you will need to add it externally. The size/structure of these memories is not conducive to the same processes as high speed logic, which is why you typically don't see them mixed these days.
E.g. TI does have MCUs with integrated FRAM (some MSP430 variants). Not sure if it'a a homogenous silicon. If not prohibited by costs, I would suggest serial FRAM (SPI, IIC). Data retention and number of erase/write cycles is practically unlimited, and without additional delay (Flash/EEPROM has erase times in the milliseconds range).
2016-03-27 10:57 AM