| 数据搜索系统,热门电子元器件搜索 |
|
AN2540 数据表(PDF) 9 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2540 数据表(HTML) 9 Page - STMicroelectronics |
|
9 / 25 page ![]() AN2540 - Application note Implementing the EEPROM emulation 9/25 3.2 1st method Parameter records stored in EEPROM vary in size and update frequency. Users using this method would usually know the update frequency in advance. In this method, sector0 and sector1 in Bank1 are used. These Flash memory sectors are write-accessed in order to store several non-volatile variables. For this purpose, they have to be divided identically into several parts, one per variable. The size of the memory space allocated to each variable depends on the variable update frequency. The first 16-bit value of each variable is stored at the base address of the memory space allocated to the variable. When the variable is updated, the new value is stored at the next available address: Base address + 2, base address + 4 and so on until no room remains in the allocated memory space. The 1st method Emulation driver meets the following requirements: ● At least two boot Flash memory sectors have to be used, more if possible for wear leveling (refer to Section 4.2) ● Minimum use of SRAM ● Simple and easily updatable code model ● User API consisting of EepromFormat, FindValidSector, WriteVariable, ReadVariable. ● Clean-up and internal data management transparent to the user ● Code in Main Flash memory, data storage in Secondary Flash memory 3.2.1 Application example Let us assume that in sector0, three 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 tA. ■ The second variable B value is stored at t1 and variable B(t) is updated every tB. ■ The third variable C value is stored at t2 and variable C(t) is updated every tC. In a typical application, the majority of non-volatile data are seldom updated, only a few data are updated more frequently. Let us consider tC < tA< tB. This means that C is updated more often than A and B, and that A is updated more often than B. So more memory space should be allocated to C than to A and B, and A should have more space than B (refer to Figure 2). |
|
|
链接网址 |
| 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 |