| Electronic Components Datasheet Search |
|
AN3265 Datasheet(PDF) 16 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3265 Datasheet(HTML) 16 Page - STMicroelectronics |
|
16 / 19 page ![]() Software description AN3265 16/19 Doc ID 17860 Rev 1 2.3.5 Saving SystemState in data EEPROM To demonstrate how to use the data EEPROM for saving data, the SystemState global variable is saved and then read back from memory. This step is not mandatory since there are several solutions to keep this variable unchanged during reset. The solution depends on the compiler. Raisonance compiler SystemState must be declared as global since global variables are created either in the Zero Page or in the RAM Data segments and are consequently not re-initialized at reset. Cosmic compiler Cosmic compiler re-initializes global variables at startup. The steps required to save the value of SystemState in data EEPROM: 1. Declare the global variable with the following example syntax #pragma section [my_sec] u8 SystemState; #pragma section [] 2. Then two solutions are possible: – Either create the my_sec section in the Zero Page with the extension ‘-ib’ that prevents Cosmic compiler from re-initializing its content at reset. This can be done in the STVD Project > Settings > Linker tab > Category: Input menu (see Figure 7). – Or directly modify the project linker file to perform the same operation. It is mandatory to remove the Auto option in STVD linker tab (see Figure 7). To do this, open the file CSS_WDG_Robustness.lkf located in the STVD/Cosmic/Debug folder of the Cosmic project and modify it as follows. # Segment Zero Page: +seg .bsct -b 0x0 -m 0x100 -n .bsct +seg .ubsct -a .bsct -n .ubsct +seg .bit -a .ubsct -n .bit -id +seg .share -a .bit -n .share -is +seg .my_sec -a .share -n .my_sec –ib For more details, refer to the Cosmic user manual available in the Cosmic installation directory |
|
|
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 |