| 数据搜索系统,热门电子元器件搜索 |
|
AN2244 数据表(PDF) 5 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2244 数据表(HTML) 5 Page - STMicroelectronics |
|
5 / 17 page ![]() AN2244 3 Application example: EEPROM emulation using ST10F27x Flash library 5/17 3 Application example: EEPROM emulation using ST10F27x Flash library 3.1 Purpose The purpose of this example is to show how a portion of the ST10F27x embedded Flash can be used to replace a serial EEPROM to store and update non volatile data in order to save the cost of an external EEPROM. 3.2 Principle The implementation shown in this application note requires that a minimum of two Flash sectors of identical size are allocated to non volatile data storage. In this example, the sector 1 and sector 2, 8 kbytes each, of the Flash bank 0 are used. Those sectors are write accessed in 32-bit. A header field occupying the first 32-bit word of each sector represents the sector’s status. In order to use Flash to store several non volatile variables, we need to divide the two sectors identically into several parts, one per variable. For each variable, the size of the memory space is allocated according to its update frequency. The first 32-bit value of each variable is stored at the base address of its allocated memory space. When updated, the new value is stored at the next available address: base address + 4, base address + 8 and so on until no room remains from its allocated memory. Example: In the sector 1, we assume 3 variables: A, B and C will be stored and updated. The first variable A value is stored at t0 and variable A(t) is updated every The second variable B value is stored at t1 and variable B(t) is updated every The third variable C value is stored at t2 and variable C(t) is updated every In a typical application, the majority of non volatile data is updated infrequently and a few is updated more frequently. Let’s consider tA < tB< tC , this means that A is updated more than B which is updated more than C so more memory space should be allocated to A and B than C. In this application, sector 1 is divided as follows: ● 0x2000-0x2FFF memory space will be allocated to variable A ● 0x3000-0x3FEB memory space will be allocated to variable B ● 0x3FEC-0x3FFF memory space will be allocated to variable C t A t B t C |
|
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 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 |