STMicroelectronics AN3969 EEPROM Emulation in STM32F40x/STM32F41x Microcontrollers Application Note

This document describes the software solution for substituting standalone EEPROM by emulating the EEPROM mechanism using the on-chip Flash of STM32F40x/STM32F41x devices.


STMicroelectronics AN3969 EEPROM Emulation in STM32F40x/STM32F41x Microcontrollers Application Note - cover page
Brand
STMicroelectronics
Category
microcontrollers
Document type
Application Note
Language
English
Pages
22
File format
PDF
File size
209 KB
Published
07 August, 2012
Updated
30 September, 2023
MD5 checksum
9E5F9145E2BA18F6ABD5B4B87E311B82

About this manual

The document details how to replace external EEPROMs with internal Flash memory in STM32F40x/STM32F41x devices. It explains that while the device features 4 Kbytes of backup SRAM for native EEPROM emulation, this solution is intended for applications where VBAT power is unavailable or the SRAM is used for other purposes.

The note provides a software algorithm to emulate EEPROM by utilizing at least two Flash memory sectors. The implementation includes mechanisms for wear leveling, page header recovery in case of power loss, and background sector erasure to ensure data integrity without interrupting CPU operations.

What's inside

  • Main differences between external and emulated EEPROM
  • Implementing EEPROM emulation principle
  • EEPROM emulation software description
  • Wear leveling implementation
  • Page header recovery in case of power loss
  • Cycling capability and page allocation
  • Real-time considerations

Specifications

Backup SRAM Size4 Kbytes
System Clock Frequency (Example)168 MHz

Frequently asked questions

What is the purpose of this application note?

It describes the software solution for substituting standalone EEPROM by emulating the EEPROM mechanism using the on-chip Flash.

What are the requirements for the EEPROM emulation driver?

The driver must be lightweight with a simple API, have reduced footprint, and support background sector erase.

Download PDF (209 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →