Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

AN2540 Datasheet(PDF) 19 Page - STMicroelectronics

Part # AN2540
Description  EEPROM emulation in STR91xFxx devices
PDF  25 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2540 Datasheet(HTML) 19 Page - STMicroelectronics

Back Button AN2540 Datasheet HTML 15Page - STMicroelectronics AN2540 Datasheet HTML 16Page - STMicroelectronics AN2540 Datasheet HTML 17Page - STMicroelectronics AN2540 Datasheet HTML 18Page - STMicroelectronics AN2540 Datasheet HTML 19Page - STMicroelectronics AN2540 Datasheet HTML 20Page - STMicroelectronics AN2540 Datasheet HTML 21Page - STMicroelectronics AN2540 Datasheet HTML 22Page - STMicroelectronics AN2540 Datasheet HTML 23Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 19 / 25 page
background image
AN2540 - Application note
Embedded application aspects
19/25
Figure 8.
WriteOnebyte function description
The above function is used to write the "FMI_Data" data byte to the "FMI_Address" address.
4.2
Wear-leveling: Flash endurance improvement
In the STR91xFxx on-chip Flash memory, each sector can be programmed or erased
reliably over 100 000 times.
For write-intensive applications that use more than two sectors (3 or 4) for the emulated
EEPROM, it is recommended to implement a wear-leveling algorithm to monitor and
distribute the number of write cycles among the sectors.
When no wear-leveling algorithm is used, the sectors are not used at the same rate. Sectors
with long-lived data do not endure as many write cycles as sectors that contain frequently
updated data. The wear-leveling algorithm ensures that equal use is made of all the
available write cycles for each sector.
4.2.1
Application example
In this example, in order to enhance the emulated EEPROM capacity, four sectors will be
used.
To implement the wear-leveling algorithm with the 2nd method scheme, the procedure is the
following: when sector n is full, switch to sector n+1. Sector n is then garbage-collected. Let
us consider the four sectors of the example: when sector3 is full, the device goes back to
sector0, then sector 3 is garbage-collected and so on (refer to Figure 9.).
void WriteVariable(u32 FMI_Address,u8 FMI_Data)
{
if (FMI_Address &1)
{
FMI_WriteHalfWord(FMI_Address,((FMI_Data << 8) | 0xFF));
FMI_WaitForLastOperation(FMI_BANK_1);
}
else
{
FMI_WriteHalfWord(FMI_Address,(0xFF00 |FMI_Data));
FMI_WaitForLastOperation(FMI_BANK_1);
}
}



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25


Datasheet Download

Go To PDF Page


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


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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