Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

AN1774 Datasheet(PDF) 8 Page - STMicroelectronics

Part # AN1774
Description  STR71x SOFTWARE DEVELOPMENT GETTING STARTED
PDF  9 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN1774 Datasheet(HTML) 8 Page - STMicroelectronics

  AN1774 Datasheet HTML 1Page - STMicroelectronics AN1774 Datasheet HTML 2Page - STMicroelectronics AN1774 Datasheet HTML 3Page - STMicroelectronics AN1774 Datasheet HTML 4Page - STMicroelectronics AN1774 Datasheet HTML 5Page - STMicroelectronics AN1774 Datasheet HTML 6Page - STMicroelectronics AN1774 Datasheet HTML 7Page - STMicroelectronics AN1774 Datasheet HTML 8Page - STMicroelectronics AN1774 Datasheet HTML 9Page - STMicroelectronics  
Zoom Inzoom in Zoom Outzoom out
 8 / 9 page
background image
8/9
STR71x SOFTWARE DEVELOPMENT GETTING STARTED
2.2 APPLICATION EXAMPLE: INTERRUPT HANDLING
This section implements an application with interrupt handling. The main() function initializes
and starts two timer overflow interrupts.
When a timer expires, an interrupt, handled in 71x_it.c, is generated. Timer0 generates an in-
terrupt every 130 ms which toggles the GPIO0 pin. However Timer1 is configured to generate
an interrupt every 4.2 s and to set GPIO1 pin to high level for 5 s. These timing suppose that
the chip is clocked by an external oscillator operating at a frequency of 16 MHz.
The Timer0 interrupt priority has been set to be higher than the Timer1 priority to allow the
Timer0 T0TIMI_IRQHandler interrupt routine to be served during the execution of the Timer1
T1TIMI_IRQHandler interrupt routine. Figure 1. shows the behaviour of GPIO0 and GPIO1
pins and the Timer0 and Timer1 interrupts.
The example source code is located in the ’..\STR71xGS\Example2’ directory and it contains,
besides the standard files and main.c, the makefiles for the project, the project file Interrup-
tHandling.prj, the interrupt handler file 71x_it.c and the interrupt header file 71x_it.h.
This example has already been built for you. So there is no need to recompile it. You have,
simply, to open the project file Example2.prj in the RealView Debugger, to load the image
Example2.axf into the target and debug it.
For more details on STR71x interrupts’ handling, refer to the Interrupt Handling application
note, supplied within this package, or to the STR71x datasheet.
Figure 1. Timer0 and Timer1 Interrupts handling
GPIO0 pin
GPIO1 pin
Timer0 interrupt
Timer1 interrupt



Html Pages

1 2 3 4 5 6 7 8 9


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