Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

UM0097 Datasheet(PDF) 14 Page - STMicroelectronics

Part # UM0097
Description  STR71x firmware library
PDF  229 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

UM0097 Datasheet(HTML) 14 Page - STMicroelectronics

Back Button UM0097 Datasheet HTML 10Page - STMicroelectronics UM0097 Datasheet HTML 11Page - STMicroelectronics UM0097 Datasheet HTML 12Page - STMicroelectronics UM0097 Datasheet HTML 13Page - STMicroelectronics UM0097 Datasheet HTML 14Page - STMicroelectronics UM0097 Datasheet HTML 15Page - STMicroelectronics UM0097 Datasheet HTML 16Page - STMicroelectronics UM0097 Datasheet HTML 17Page - STMicroelectronics UM0097 Datasheet HTML 18Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 14 / 229 page
background image
Firmware library
UM0097
14/229
One memory mapping file 71x_map.h is supplied for all peripherals. This file contains all the
register declarations for both development and debug modes.
The header file 71x_lib.h includes all the peripheral header files. This is the only file that has
to be included in the user application to interface with the library.
You can modify the 71x_conf.h to define which peripherals need to be included in the
application to make it run.
Other files are also provided: 71x_it.h and 71x_it.c. These files contain all the firmware
functions required to handle the STR71x interrupts.
If you want to handle an interrupt routine, you should modify the appropriate function in the
file 71x_it.c (the body of each function is empty by default).
Note:
Only the 71x_conf.h and 71x_it.c files should be modified to link the application with the
library.
2.3
How to use the STR71x library
This section describes how to implement an application using the STR71x firmware library.
Example: The application initializes and starts two timer overflow interrupts. When a timer
expires, an interrupt, handled in 71x_it.c, is generated. Timer 0 generates an overflow
interrupt every 130 ms and toggles the GPIO0 pin level on/off. Timer 1 is configured to
generate an interrupt every 2.1s and to set GPIO1 pin to high level for 1.05 s. The chip is
clocked by an external oscillator at a frequency of 16 MHz.
Timer 0 interrupt priority is set to be higher than Timer 1 interrupt priority to allow the
Timer 0 T0TIMI_IRQHandler interrupt routine to be served during the execution of the
Timer 1 interrupt routine. The following figure shows the behavior of the GPIO0 and GPIO1
pins and Timer 0 and Timer 1 interrupts.
Figure 3.
Timer0 and Timer1 interrupt handling
The following steps explain how to use the STR71x library to build the user application
●
Edit the 71x_conf.h file and uncomment the _GPIO and _TIM labels, this allows you to
include the firmware libraries of the GPIO and the TIM peripherals in your firmware.
Uncomment the _GPIO0, _GPIO1, _TIM0 and _TIM1 labels to be able to access the
peripheral registers. Uncomment the DEBUG label, this allows you to see the
peripheral registers content in the watch window.
GPIO0 pin
GPIO1 pin
Timer0 interrupt
Timer1 interrupt



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


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