| Electronic Components Datasheet Search |
|
AN2540 Datasheet(PDF) 10 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2540 Datasheet(HTML) 10 Page - STMicroelectronics |
|
10 / 25 page ![]() Implementing the EEPROM emulation AN2540 - Application note 10/25 Figure 2. Sector swap scheme: Sector1 erased In this application, sector0 is divided up as follows: ■ 0x0000 0002 - 0x0000 04FF memory space is allocated to variable A ■ 0x0000 0500 - 0x0000 0510 memory space is allocated to variable B ■ 0x0000 0511 - 0x0000 1FFF memory space is allocated to variable C In sector0, variables are stored until there the memory space left is not large enough to be allocated to another variable (case of variable A in the following example). Example: Let us assuming that variable A is to be updated at time t0 + (n+1) × tA to A(t0 + (n+1) × tA). Addresses from 0x0000 0002 to 0x0000 04FF are all full, the next value is then stored in the base address of the space allocated to variable A in sector1. The latest stored values of all other variables (B and C) are transferred from their current location in sector0 to the base address of their allocated space in sector1. After the transfer of all variables is complete, sector0 is erased. Variables are then stored and updated in sector1 in the same way as described for sector0. When there is not enough memory space left for one of these variables in sector1, the variables are transferred back to sector0 (now empty) as described above and so on. This process is illustrated in Figure 3. A(t) values B(t) values C(t) values 0x0000 0000 0x0000 1FFF A(t0) B(t0) C(t0) Sector0 Sector1 Header A(t) values B(t) values C(t) values 0x0000 2000 0x0000 3FFF Sector1 Erased Update Update Update Sector swap (Erase one when using the other) A(t0 + tA) A(t0 + n × tA) B(t0 + m × tB) C(t0 + p × tC) Sector0 Header A(t0) B(t0) C(t0) A(t0 + tA) A(t0 + n × tA) B(t0 + m × tB) C(t0 + p × tC) ai14086 |
|
|
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 |