Electronic Components Datasheet Search
  English  ▼

X  

AN2165 Datasheet(PDF) 14 Page - STMicroelectronics

Part # AN2165
Description  Getting Started with Keil 關Vision ST10 Toolchain
PDF  18 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2165 Datasheet(HTML) 14 Page - STMicroelectronics

Back Button AN2165 Datasheet HTML 10Page - STMicroelectronics AN2165 Datasheet HTML 11Page - STMicroelectronics AN2165 Datasheet HTML 12Page - STMicroelectronics AN2165 Datasheet HTML 13Page - STMicroelectronics AN2165 Datasheet HTML 14Page - STMicroelectronics AN2165 Datasheet HTML 15Page - STMicroelectronics AN2165 Datasheet HTML 16Page - STMicroelectronics AN2165 Datasheet HTML 17Page - STMicroelectronics AN2165 Datasheet HTML 18Page - STMicroelectronics  
Zoom Inzoom in Zoom Outzoom out
 14 / 18 page
background image
Application example: interrupt handling
AN2165
14/18
2
Application example: interrupt handling
This section describes a simple ST10F27x software example making use of the interrupts. The
application uses Timers’ overflow interrupts to generate two square signals with different
frequencies on two standard port pins: P2.0 & P2.1.
The project contains 3 source files:
●
Timer.c: It contains c source code for the following project routines
–
Configure_GPT1_Timer_2(): In this routine, GPT1 Timer 2 is set up to operate in
Timer mode and is configured to generate an interrupt every 1.678 seconds.
–
Configure_GPT1_Timer_3(): In this routine, GPT1 Timer 3 is set up to operate in
Timer mode and is configured to generate an interrupt every 104.8 milliseconds.
–
Timer 2 and Timer 3 interrupts’ definitions: Timer 2 interrupt is toggling P2.0 while
Timer 3 interrupt is toggling P2.1.
●
Timer.h: It contains Timer.c routines prototypes.
●
main.c: It uses the routines described in Timer.c in order to start the two timer overflow
interrupts.
Timings suppose that the chip is operating at a frequency of 40 Mhz.
The environment has been setup as described in the first chapter.
For more details about the timers’ functionalities, their registers and interrupts’ handling, refer to
the ST10F27x user’s manual.
2.1
Debug operation
After successfully building the program:
●
Select Debug -> Start / Stop Debug Session from the toolbar menu.
Port 2 output signals can be displayed using the Logic Analyser feature provided by Keil. This
feature is available only on simulation mode.
In order to view the port 2 content, select Peripherals -> IO Ports -> Port 2 from the toolbar
menu.
2.2
Logic analyser use
●
Select View -> Logic Analyser Window from the toolbar menu of the debug window.
●
Select Debug -> Logic Analyser from the toolbar menu
●
Enter the variable that you want to visualize: Port 2 pin 0 and Port 2 pin1.
●
Precise the Mask to indicate if the signal corresponds to P2.0 or P2.1.



Html Pages

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


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