AN3390 EEPROM Emulation in STM32F2xx Microcontrollers Application Note

This application note describes the software solution for substituting standalone EEPROM by emulating the EEPROM mechanism using the on-chip Flash of STM32F2xx devices.


AN3390 EEPROM Emulation in STM32F2xx Microcontrollers Application Note - cover page
Brand
STMicroelectronics
Category
microcontrollers
Document type
Application Note
Language
English
Pages
22
File format
PDF
File size
192 KB
Published
07 August, 2012
Updated
30 September, 2023
MD5 checksum
F0EDA99391AC0684BBF9C2973B523E7A

About this manual

The document explains how to replace external EEPROMs with internal Flash memory in STM32F2xx devices. It details the use of specific software algorithms and at least two Flash sectors to emulate non-volatile storage, allowing for data persistence without external components.

The guide covers the implementation principles, including page status management (ERASED, RECEIVE_DATA, VALID_PAGE) and data swapping mechanisms. It also addresses embedded application aspects such as wear leveling, power loss recovery, and timing constraints.

What's inside

  • Main differences between external and emulated EEPROM
  • Implementing EEPROM emulation
  • EEPROM emulation software description
  • Embedded application aspects
  • Wear leveling: Flash memory endurance improvement
  • Page header recovery in case of power loss

Specifications

Backup SRAM Size4 Kbytes
Flash Sector Size (Sectors 0-3)16 Kbyte

Frequently asked questions

What is the maximum EEPROM size supported by this emulation?

The emulated EEPROM size is flexible and depends on the limits and constraints of the sector size used.

Is the write operation interrupted by a software reset?

No, ongoing word write operations on STM32F2xx embedded Flash are not interrupted by a CPU reset.

Download PDF (192 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →