STM32 EEPROM emulation data lost
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2016-03-21 10:19 AM
Posted on March 21, 2016 at 18:19
hi
i am using stm32F030 and using eeprom emulation to store the data the problem i am facing is this, when i perform the power reset , the data is lost and its random, some time it keeps the data and some times after power reset data is losthere is the settings i am doing and the flow* Define the size of the sectors to be used */#define PAGE_SIZE ((uint32_t)0x0400) /* Page size = 1KByte *//* EEPROM start address in Flash */#define EEPROM_START_ADDRESS ((uint32_t)0x08006000) /* EEPROM emulation start address: from sector2, after 8KByte of used Flash memory */ FLASH_Unlock(); EE_Init(); EE_ReadVariable(92,&VALUE1); // read the some value FLASH_Lock(); while(1){FLASH_Unlock();
EE_WriteVariable(92,NULL); // write data based on some even like button press or timer FLASH_Lock(); }
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2016-03-21 11:47 AM
Posted on March 21, 2016 at 19:47
Yes, I think you'll need to dig into the implementation, and understand how robust it is, and how it recovers from erase failures, or as it transitions from page to page.
More practically you could use the Flash directly, and understand its function and limitations.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
