cancel
Showing results for 
Search instead for 
Did you mean: 

HI I am using 32f207 and eeprom emulation logic for storing data in flash. I like to know what will be values if we erase this flash memory? I am getting something like 3784 value read after erasing flash

UMahi.1
Associate II
 
7 REPLIES 7
TDK
Guru

Erased flash will have 0xFF values.

If you feel a post has answered your question, please click "Accept as Solution".

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?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
UMahi.1
Associate II

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.

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 .

> But When I read the contents in code

How?

JW

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.

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