| Electronic Components Datasheet Search |
|
AN2244 Datasheet(PDF) 13 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2244 Datasheet(HTML) 13 Page - STMicroelectronics |
|
13 / 17 page ![]() AN2244 3 Application example: EEPROM emulation using ST10F27x Flash library 13/17 Program/Erase functions In this application, the following functions provided by the Flash library are used: ● FlashVerifyWord( ) ● FlashProgramWord( ) ● FlashSectorErase( ) ● FlashWait( ) 3.4.4 Using EEPROM routines in a main program The number of variables needed must be defined in the eeprom.h file. For example, #define max_varia 0x3 #define A 0x2004 #define B 0x3000 #define C 0x3FEC //#define D ... etc... The application must declare the variables array: u32 Tab[max_varia] = {A, B, C //D, etc... }; To write in the eeprom, use the WriteVariable( ) routine which returns "0" on success and the error code upon failure. Reading from the eeprom is performed by the ReadVariable( ) routine. 3.4.5 Program execution The internal Flash of some ST10F27x derivatives (ST10F276, ST10F275 and ST10F273) offers the ability to update one bank while code is executed from another bank. Therefore there is no need to transfer Flash operations (Program/Erase) to RAM. In this case, the emulation driver can be downloaded into a bank other than bank0. The internal Flash of the remaining ST10F27x dervatives (ST10F271 and ST10F272) contains just one bank. Therefore, the Flash operations (Program/Erase) must be copied into and executed from RAM. |
|
|
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 |