2013-11-25 08:50 AM
Hi,
This is a post that was posted before in a wrong thread, this post was : I would like to store my data in memory when the computing is done and used the data for the next use. I don't have the EEPROM memory on my STM32F3, can i use the flash as an EEPROM? Thanks in advance for any help.Clive response was :
I don't have the EEPROM memory on my STM32F3, can i use the flash as an EEPROM? Is that a design oversight, or you just don't want to attach one? You could, however it is not designed for frequent, or multiple writing. Writing and Erasing Flash will cause the processor to stall quite significantly if you are also executing code from it. ST has some EEPROM emulation examples, but they are not really designed for large structures.
fm response :
I don't have the EEPROM memory on my STM32F3, can i use the flash as an EEPROM?In theory yes, but most probably not. See the datasheet for FLASH erase/program times, which is in the millisecond range. For a higher data rate, you can evaluate serial SRAM/NVSRAM. #stm32f3-discovery
2013-11-25 08:56 AM
In fact, i have 8 variables (float) that i want to store to use them for computing each time the main is executing and i don't want to loose them even if the board is off.
I want to take a portion of the flash integrated in the STM32F3 for that purpose. There is any example in the libraries given by ST? i didn't see that in the examples i have. Thanks2013-11-25 08:56 AM
http://www.st.com/web/en/catalog/tools/PF258148
Other resources try googling part# on chip ''STM32F303VC' see Design Resouces2013-11-25 08:56 AM
In fact, i have 8 variables (float) that i want to store to use them for computing each time the main is executing and i don't want to loose them even if the board is off.
I want to take a portion of the flash integrated in the STM32F3 for that purpose. There is any example in the libraries given by ST? i didn't see that in the examples i have. Thanks2013-11-25 09:00 AM
Thanks clive and fm for you fast responses
Ok, but how much data and how frequently? Writing process is done one time and can be stored for many days and reading process is each time the board is on and main is executing. 8 float data
2013-11-25 09:19 AM
We cross-posted at 5:56, perhaps why the forum gave you an error and you ended up double posting. Most of these errors occur when it's showing you the refreshed thread. Open the thread in a new window before trying to repost.
I edited the post based on the fact you stated the size/freq, I was responding to the top post. You might also just want to learn how to write into flash, if you can write a journeled update of the values you can reduce the erase cycles significantly. STM32F3-Discovery_FW_V1.1.0\Project\Peripheral_Examples\FLASH_Program STM32F30x_DSP_StdPeriph_Lib_V1.0.0\Project\STM32F30x_StdPeriph_Examples\FLASH\FLASH_Program2013-11-25 10:58 AM
That would be fine.
From the history of this thread, I assumed you want to store hundreds of kilobytes per second. In this case, you would get into trouble with the possible writing speed. Additionally, you may note that the guaranteed number of erase/write cycles is limited. Flash is not designed for frequent change, it will ''wear out'' and become unusable. I'd bet ST guarantees 10k cycles ...2013-11-25 12:56 PM
Thanks for your helpful suggestions, i'll try these examples .
Flash is not designed for frequent change :In this case is better to use an external EEPROM with I2C bus for example? In my application, i have to store data in the first time( may be one time per month)and are supposed to be read every time the program is executed. The speed is not an important criteria because i need speed only after data are loaded from the memory.
2013-11-26 12:09 AM
As said, check the datasheet, and compare with your needs.
Writing once in a while is no problem - with erasing/writing once a month, you probably never hit the limit. In contrast, I had been involved in the design of devices that required persistent storage for an implemented protocol. And 10k guaranteed erase/write cycles would have resulted in a worst-case lifetime of 2..3 weeks. That would have been unacceptable for a commercial device ...2013-12-02 04:02 AM
Hi again,
With your help, now i can use the flash to write and even read. Thanks But, i still have a problem. In fact, i want to store float variables, unfortunately FLASH_Status FLASH_ProgramWord(uint32_t Address, uint32_t Data) function allows only integers ones. How can i manage this stuff ?Thanks in advance for any help,Best Regards