Skip to main content
UMahi.1
Associate II
September 20, 2021
Question

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

  • September 20, 2021
  • 5 replies
  • 1561 views

..

This topic has been closed for replies.

5 replies

TDK
Super User
September 20, 2021

Erased flash will have 0xFF values.

"If you feel a post has answered your question, please click ""Accept as Solution""."
UMahi.1
UMahi.1Author
Associate II
September 21, 2021

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 .

Tesla DeLorean
Guru
September 20, 2021

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 VenmoUp vote any posts that you find helpful, it shows what's working..
UMahi.1
UMahi.1Author
Associate II
September 21, 2021

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.

waclawek.jan
Super User
September 21, 2021

> But When I read the contents in code

How?

JW

UMahi.1
UMahi.1Author
Associate II
September 21, 2021

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.

waclawek.jan
Super User
September 21, 2021

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