Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN3265 Datasheet(PDF) 12 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) 12 Page - STMicroelectronics

Back Button AN3265 Datasheet HTML 8Page - STMicroelectronics AN3265 Datasheet HTML 9Page - STMicroelectronics AN3265 Datasheet HTML 10Page - STMicroelectronics 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 Next Button
Zoom Inzoom in Zoom Outzoom out
 12 / 19 page
background image
Software description
AN3265
12/19
Doc ID 17860 Rev 1
2.3.2
Interrupt function flowcharts
Port B interrupt function handler
This interrupt routine is associated to button1. It is called when the user presses button (see
Table 2).
Clock interrupt function handler
This interrupt routine is called when a failure is detected on the HSE clock used as master
clock (see Table 2).
2.3.3
State machine flowchart
The State_Machine() function implements the algorithm that controls the progress of the
application execution according to external events.
1.
SystemState = 0
LD2 blinks. The application is ready to demonstrate how to use the WWDG:
a)
The first time Button1 is pressed, an interrupt is triggered and the ButtonPressed
flag is set (see Section : Port B interrupt function handler). As a result, the
execution time is lengthened. This is signalled by LD2 blinking at a slower rate
since the Dly parameter which controls the delay between each WWDG refresh is
incremented.
b)
The second time Button1 is pressed, the delay introduced by Dly becomes too
long to refresh the WWDG counter in time. The STM8S105C6T6 is then reset by
the WWDG. Just before the reset, SystemState variable is saved in the data
EEPROM. This shows how to use the data EEPROM for data saving (see
Section 2.3.5: Saving SystemState in data EEPROM).
2.
SystemState = 1
LD3 blinks. The HSE crystal clock is selected as the master clock source to
demonstrate the effectiveness of the clock failure mechanism performed by the CSS
when the clock fails. In this case, the failure is induced when pressing Button2 (see
Figure 2: Application state machine).
However, the application is not stopped as the CSS switches automatically the master
clock source from the HSE to the HSI clock. The completion of the switching operation
Table 2.
Interrupt routine versus flag
Interrupt routine
Event
Flag
PortB_IRQHandler()
Button1 pressed
ButtonPressed set
Clk_IRQHandler()
Failure detected on HSE
clock and HSE = master
clock
CSS_flag set



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