| Moteur de recherche de fiches techniques de composants électroniques |
|
AN2540 Fiches technique(PDF) 19 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2540 Fiches technique(HTML) 19 Page - STMicroelectronics |
|
19 / 25 page ![]() 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); } } |
|
Lien URL |
| ALLDATASHEET vous a-t-il été utile ? [ DONATE ] |
À propos de Alldatasheet | Publicité | Contactez-nous | Politique de confidentialité | Lien vers la fiche technique | Echange de liens | Fabricants 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 |