2021-09-20 07:04 AM
2021-09-20 07:23 AM
Erased flash will have 0xFF values.
2021-09-20 09:17 AM
Using the EPROM Emulation library, or your own?
Sure it's not reporting any errors?
Perhaps you could detect that the underlying sectors used for this are erased, and do some initialization, and setting of defaults?
Even better would be to understand the mechanics of the flash memory, and its usage in a normal fashion, and then journal a structure over the sector(s) to achieve the data storage / retention you need?
2021-09-21 12:04 AM
Thank you. I am using EPROM emulation library. EEinit function will check the state and it has erased the flash because of invalid state. But When I read the contents in code it shows 3784 . It should show FF but dont understand why it is showing 3784.
2021-09-21 12:07 AM
yes but I see the value 3784. I did full flash erase using STlink utility then downloaded my code and next power on just read those values it shown 3784 .
2021-09-21 02:17 AM
> But When I read the contents in code
How?
JW
2021-09-21 02:45 AM
I have erased full chip using ST link utility. Programmed my application code and read the variables which are read from flash. In STlink utility it shows FF but in my code after read flash it shows 3784 for read32variable.
2021-09-21 03:33 AM
I don't know the EEPROM emulation library, but IMO it has some "formatting" procedure you have to follow, instead of erasing it from "outside".
JW