- Is it safe to use ? will it reduce life of uC ?
Is there any disadvantage of it ?
Will it still work if I enable read-protection of the uC’s flash ?
See ST application note page 5/10 (Write/Erase cycles)
http://www.st.com/content/ccc/resource/ … 165693.pdf
Also each 1k flash page is separate, so its at leas 10,000 times the number of pages.
But if you want to use different flash pages, you’ll need to write code to manage how many times you use each page of flash e.g. store a usage count in that page with your data.
http://www.st.com/content/ccc/resource/ … 025071.pdf
Section 1.9
It survives a reset, as well, as long as you keep the normal power on.
They are ultra cheap I soldered the plain chips myself with a smd-adapter board. Drawback: You must delete a whole sector (16 pages) before overwriting, so you need a least a 4kb buffer (for the page) or using a buffer sector on the chip (reading the overwriting sector out, pushing it to the buffer sector and write the differences to the overwriting sector).
I see there is a newer library for arduino out: https://forum.arduino.cc/index.php?topic=324009.0
Haven’t looked inside, but I assume that converting it is simple (only SPI routines)
http://www.st.com/content/ccc/resource/ … 025071.pdf
Section 1.9
http://www.st.com/content/ccc/resource/ … 025071.pdf
Section 1.9
The CB is a medium density as well so it’s not rated for the 84 bytes too..
Anyway who knows that both C8 and CB are in truth high density devices..
The CB is a medium density as well so it’s not rated for the 84 bytes too..
Anyway who knows that both C8 and CB are in truth high density devices..
FRAM makes more sense.
I have some samples but I have never gotten around to a lab test. Retirement is a busy phase of life.
Ray
See i thought there wouldnt be any issue with regularly saving data.
In my speedo project theres going to be a configuration page on the display. here you can set some of the global variables. I assumed that the variables would be stored on the flash.
Also the odometer, while thats just counting the miles. Thats a variable thats going to be regularly updated and stored.
So from reading this thread, storing in eeprom or the onboard flash is a really bad idea…
Whats a better alternative?
So from reading this thread, storing in eeprom or the onboard flash is a really bad idea…
Whats a better alternative?
Storing settings in Flash is fine, as I suspect they don’t get updated that often
Writing the ODO data to flash e.g. with a value to 0.1 mile, means you will be updating this quite often, several times a minute, so you would need to employ a strategy where you were not constantly having to erase the flash
You’d need to check the manual, but I thought that its the number of erase cycles thats limited.
So you could just, for example, use a 2x 1k banks of flash, and initially erase the active bank, then write the data into locations sequenitally, without erasing the whole bank each time.
In this scenario, at powerup, you could would need to scan down from the top of both banks, to find the first address that was not blank, and read that value as the ODO value, then on the next update, of the ODO data your code would write to the next address, above the address where it found the data.
When you reach the end of one bank of ram, you would need to put data into the first location in the next bank, and then erase the current bank, ready for reuse.
So that your 2 banks of flash perform a circular store
– High-endurance 100 trillion (10^14 ) read/writes
– High-endurance 100 trillion (10^14 ) read/writes
If the OP could sense when the power is going off, and then have time to save the value to flash, that would be one option e.g have a capacitor large enough to keep the CPU running for a millisecond should be enough, assuming the flash bank is already erased and ready to be programmed.
If the OP could sense when the power is going off, and then have time to save the value to flash, that would be one option e.g have a capacitor large enough to keep the CPU running for a millisecond should be enough, assuming the flash bank is already erased and ready to be programmed.
DS3231 STM32F103ZET6
VCC 3.3V
GND GND
SDA PB7 (i2C1_SDA)
SCL PB6 (i2C1_SCL)
I see there is a newer library for arduino out: https://forum.arduino.cc/index.php?topic=324009.0
Haven’t looked inside, but I assume that converting it is simple (only SPI routines)

![[SOLVED] Discovery STM32F100RB — Trouble with timers and library structure](https://sparklogic.ru/wp-content/uploads/2019/11/st-stm32vl-discovery-90x90.jpg)
