Zakładka z wyszukiwarką danych komponentów
  Polish  ▼
ALLDATASHEET.PL

X  

UM0851 Arkusz danych(PDF) 28 Page - STMicroelectronics

Numer części UM0851
Szczegółowy opis  SPEAr is a family of highly customizable ARM-based embedded
PDF  245 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Producent  STMICROELECTRONICS [STMicroelectronics]
Strona internetowa  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

UM0851 Arkusz danych(HTML) 28 Page - STMicroelectronics

Back Button UM0851 Datasheet HTML 24Page - STMicroelectronics UM0851 Datasheet HTML 25Page - STMicroelectronics UM0851 Datasheet HTML 26Page - STMicroelectronics UM0851 Datasheet HTML 27Page - STMicroelectronics UM0851 Datasheet HTML 28Page - STMicroelectronics UM0851 Datasheet HTML 29Page - STMicroelectronics UM0851 Datasheet HTML 30Page - STMicroelectronics UM0851 Datasheet HTML 31Page - STMicroelectronics UM0851 Datasheet HTML 32Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 28 / 245 page
background image
Platform section
UM0851
28/245
Doc ID 16604 Rev 2
Setting the source clock
There are two possible clock sources for each timer block. One source can be directly from
PLL3 (constant 48 MHz) and the other can be from PLL1 through synthesizer. Either of
these source clocks can be selected by the following API.
Note:
1
The selection of the source clock applies to the whole timer hardware block thus affecting
both channels.
2
When the PLL1 (system) clock is selected as the timer clock, any change in the system
clock for power saving, etc. has an impact on the frequency of the GPT. In such cases, you
must always get the current clock rate for programming next GPT interrupt. Please refer to
clock framework chapter for information on clock framework usage.
3
The use of 48 MHz (PLL3) is discouraged as it leads to unpredictable results in reading
counter value. Please refer to the GPT application note for details.
/* set the appropriate clock src
source can be:
SPEAR_TIMER_SRC_SYS_CLK,from PLL1
SPEAR_TIMER_SRC_PLL3_CLK,from PLL3
*/
void spear_timer_set_source(struct spear_timer *timer, int source);
Programming the prescaler
After configuring the appropriate clock source, you can program the prescaler. The
prescaler can be different for each timer channel (within a hardware block) and can range
from 1 to 256 in 8 levels.
/* set the appropriate prescaler
prescaler can be
GPT_CTRL_PRESCALER1 0x0
GPT_CTRL_PRESCALER2 0x1
GPT_CTRL_PRESCALER4 0x2
GPT_CTRL_PRESCALER8 0x3
GPT_CTRL_PRESCALER16 0x4
GPT_CTRL_PRESCALER32 0x5
GPT_CTRL_PRESCALER64 0x6
GPT_CTRL_PRESCALER128 0x7
GPT_CTRL_PRESCALER256 0x8
*/
spear_timer_set_prescaler( struct *spear_timer, int prescaler);
GPT interrupt management
Each timer channel of a hardware block of GPT has separate independent interrupt lines.
You can use the following API to know which interrupt line is associated with the timer. Then
using Linux calls, you can attach an interrupt handler to these irq lines. You can use
separate APIs to enable and clear the interrupts for a timer.
/* This shall return the irq associated with timer */
int spear_timer_get_irq(struct spear_timer *timer);
/* Enable/Disable the timer match interrupt */
void spear_timer_set_match(struct spear_timer *timer, int enable);



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


Arkusz danych Pobierz

Go To PDF Page


Link URL



Czy Alldatasheet okazała się pomocna?  [ DONATE ] 

O Alldatasheet   |   Reklama   |   Kontakt   |   Polityka prywatności   |   Link do karty katalogowej    |   Linki   |   Lista producentów
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