cancel
Showing results for 
Search instead for 
Did you mean: 

eeprom emulation

Elik Livnat
Associate II
Posted on January 01, 2018 at 22:26

Hi,

Does anybody has information about eeprom emulation for STM32F7 series, examples or article?

I could only find for the STM32F4 series.

Thank you.

Elik

#eeprom
1 REPLY 1
Sebastian K.
Associate II
Posted on January 02, 2018 at 14:43

Hello,

I just did this on an F767. You should find the example code in the F7 firmware package under /Projects/STM32F767ZI-Nucleo/Applications/EEPROM/

That's what I used pretty much unchanged. I just added a fix to function EE_VerifyPageFullyErased that I found here (was posted by someone else in another thread I don't find now):

https://os.mbed.com/users/mega64/code/00_eeprom_emulation_f401/docs/e91328f723ab/eeprom_8cpp_source.html

 

And then you should adapt the page sizes and page start adresses in the eeprom.h to those you want to use on your MCU, making sure that your code does not overlap with the pages you reserve for EEPROM. ST-Link is a useful tool for checking out the memory allocation in your MCU, and even to check that your code writes to the correct region.

Important hint: When you write to the MCU's flash in that way, it locks the rest of the MCU during the time of writing, which can be several ms depending on how much you write. So make sure that during that time you have no communication via peripherals running, or you will loose data.