Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN3265 Datasheet(PDF) 16 Page - STMicroelectronics

Part # AN3265
Description  Handling hardware and software failures with the STM8S-DISCOVERY
PDF  19 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN3265 Datasheet(HTML) 16 Page - STMicroelectronics

Back Button AN3265 Datasheet HTML 11Page - STMicroelectronics AN3265 Datasheet HTML 12Page - STMicroelectronics AN3265 Datasheet HTML 13Page - STMicroelectronics AN3265 Datasheet HTML 14Page - STMicroelectronics AN3265 Datasheet HTML 15Page - STMicroelectronics AN3265 Datasheet HTML 16Page - STMicroelectronics AN3265 Datasheet HTML 17Page - STMicroelectronics AN3265 Datasheet HTML 18Page - STMicroelectronics AN3265 Datasheet HTML 19Page - STMicroelectronics  
Zoom Inzoom in Zoom Outzoom out
 16 / 19 page
background image
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



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19


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