Skip to content

danyhm/EEPROM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multipage EEPROM emulation for STM32



Based on EEPROM emulation of nimaltd. unlike his code this library uses a transfer page instead of RAM to change the contents of an unerased flash page.
PROs : it uses no RAM.
Cons : The transfer page will wear out pretty quick if too much data is changed.
this library is useful when the amount of data to be writen is very much but they are not going to be changed often.

How to use :
1- Include the Files in your project.
2- Edit eepromConfig.h based on your needs.
3- include the correct HAL header in eeprom.h
4- your EEPROM variables will have a virtual address starting from 0 and ending at the size of your MCU page size / 4 * total number of pages in use (excluding transfer page).

WARNING !!
1- This code does not have flash wear level algorithm. you should be careful how much you write in a specific address. if you don't know what this is refer to ST document about EEPROM emulation and preferebly use that code.
2- Page trasfer is done automatically. if you need to fully erase a page , you should do it by it's PAGE Number not virtual Address !
TODO:
1- Add a preprocessor option to change between RAM transfer and page trasfer
2- Add compiler options in readme to preserve the flash space.
3- Inspect possible option to add functions to handle 16 bit flash writing.
4- implement a way to detect data being written in overlapping pages.

Releases

No releases published

Packages

No packages published

Languages