Part # Application Notes Access Control Accessories Adapters Audio Broadcast Computer Power Supply Corded Terminals Cordless Terminal D datasheet

Part Manufacturer: ST Microelectronics

ST Microelectronics

Part Description: PROM emulation in STM32F101xx and STM32F103xx microcontrollers


Part Details:

AN2594 Application note EEPROM emulation in STM32F101xx and STM32F103xx microcontrollers Introduction Many applications require EEPROM (electrically erasable programmable read-only memory) for non-volatile data storage. For low-cost purposes, the STM32F101xx and STM32F103xx devices do not use EEPROM. Instead, they implement EEPROM emulation using the embedded Flash memory. This application note explains the differences between external EEPROM and embedded Flash memory, and it describes a software method for emulating EEPROM using the on-chip Flash memory of the STM32F101xx and STM32F103xx devices. This document also focuses on some embedded aspects in emulated EEPROM data storage, that the reader is assumed to know. Glossary Medium-density devices are STM32F101xx and STM32F103xx microcontrollers where the Flash memory density ranges between 32 and 128 Kbytes. High-density devices are STM32F101xx and STM32F103xx microcontrollers where the Flash memory density ranges between 256 and 512 Kbytes. June 2008 Rev 2 1/16 www.st.com Contents AN2594 Contents 1 Embedded Flash memory versus EEPROM: main differences . . . . . . . 5 1.1 Difference in write access time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2 Difference in writing method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3 Difference in erase time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2 Implementing EEPROM emulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.1 Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.1.1 Application example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.1.2 EEPROM software description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3 Embedded application aspects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.1 Data granularity management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.1.1 Programming on a word-by-word basis . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.1.2 Programming on a byte-by-byte basis . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.2 Wear leveling: Flash memory endurance improvement . . . . . . . . . . . . . . 11 3.2.1 Wear-leveling implementation example . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.3 Page header recovery in case of power loss . . . . . . . . . . . . . . . . . . . . . . 12 3.4 Cycling capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2/16


Please click the following link to download the datasheet:

Application Notes Access Control Accessories Adapters Audio Broadcast Computer Power Supply Corded Terminals Cordless Terminal D.pdf Datasheet