There are two ways of emulating EEPROM on the STM32F4:
- On-chip 4 Kbytes backup SRAM
- On-chip Flash, with specific software algorithm
The second option is described here: AN3969.
But google, unfortunately, hasn't been able to provide information on how to use the first option - using the 4Kb of backup SRAM as EEPROM?..
Can anyone help on the topic?
must do these:
Enable the PWR clock
Enable access to the backup domain
Enable backup SRAM Clock
Enable the Backup SRAM low power Regulator to retain it's content in VBAT mode
and you can write/read datas to sram (these codes from BKP_Domain codes in STM32F4xx_DSP_StdPeriph_Lib) (in my mcu stm32f417 BKPSRAM_BASE=0x40024000)
then if you want:
you can find these functions in STM32F4xx_DSP_StdPeriph_Lib.