| 数据搜索系统,热门电子元器件搜索 |
|
AN2244 数据表(PDF) 13 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2244 数据表(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. |
|
|
链接网址 |
| 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 |