| Electronic Components Datasheet Search |
|
AN2540 Datasheet(PDF) 8 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2540 Datasheet(HTML) 8 Page - STMicroelectronics |
|
8 / 25 page ![]() Implementing the EEPROM emulation AN2540 - Application note 8/25 3 Implementing the EEPROM emulation 3.1 Principle This emulation is performed in various ways by considering the Flash memory limitations and the product requirements. Two approaches are described below in detail. Both require a minimum of two Flash memory sectors of identical size, that are allocated to non-volatile data. One that is initially erased and can be programmed byte by byte, and the other that is ready to take over when the first sector needs to be garbage-collected. Since the STR91xFxx on-chip Flash memory can be programmed on a 16-bit half-word basis, the data granularity in this implementation is 16 bits. A header field that occupies the first 16-bit half word of each sector indicates the sector status. Each sector has four possible states: ● ERASED: The sector is empty. ● RECEIVE_DATA: The sector is receiving data from the full sector. ● VALID_SECTOR: The sector contains valid data and its state will not change until valid data are completely transferred to the erased sector. ● TRANSFER_COMPLETE: Transfer of data to the other sector is finished and this sector is no longer in use. The system can then erase it and prepare it for future data. Figure 1. shows how to switch from one state to another for both sectors. Figure 1. Header field status switching between sector0 and 1 Valid0 Erased1 Valid0 Receive1 Transfer_ complete0 Valid1 Erased0 Valid1 Receive0 Valid1 Transfer_ complete1 Valid0 Sector0 Full Transfer data from sector0 to sector1 complete Erase0 Sector1 Full Write data in sector0 Copy data from sector0 Erase1 to sector1 Copy data from sector1 to sector0 Write data in sector1 Transfer data from sector1 to sector0 complete States related to sector1 States related to sector0 ai14085 |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |