cancel
Showing results for 
Search instead for 
Did you mean: 

FLASH data is not held

Ala
Senior

hey there

I have a STM32f030k6t6 which I wish to store data in its FLASH eeprom.

the thing is sometimes data on certain addresses are cleared in startup! here is my code

HAL_FLASH_Unlock();
EE_Init();//eeprom initiallization
EE_ReadVariable(ID_FLASH_ADD,&read_flash);//attemt to read flash to get ID data

this code is at the beginning of my code and surprisingly sometimes on startup I see ID is 0! where its value was something else but clearly it is 0ed! what happens on startup which makes this happen?

1 REPLY 1

Seen a couple of complaints about the EEPROM Emulation library.

You'll likely need to walk the code to understand all the circumstance where it will rewrite or erase the memories. I'd assume there are some basic integrity checks to deal with corruption, or where a write or erase failed.

You could always manage the FLASH and journalling methods yourself

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