Electronic Components Datasheet Search
  English  ▼

X  

UM0851 Datasheet(PDF) 29 Page - STMicroelectronics

Part # UM0851
Description  SPEAr is a family of highly customizable ARM-based embedded
PDF  245 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

UM0851 Datasheet(HTML) 29 Page - STMicroelectronics

Back Button 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 UM0851 Datasheet HTML 33Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 29 / 245 page
background image
UM0851
Platform section
Doc ID 16604 Rev 2
29/245
/* Clear the match interrupt status
value must be GPT_STATUS_MATCH
*/
void spear_timer_write_status(struct spear_timer *timer, u16 value)
GPT operation
The following APIs can be used to start/stop the GPT timer in single-shot or auto-reload
mode.
/* This shall load the timer with "load" count value and start the timer */
void spear_timer_set_load_start(struct spear_timer *timer, int autoreload, u16
load);
/* These APIs separately load, start and stop the timer */
void spear_timer_set_load(struct spear_timer *timer, int autoreload, u16 load);
void spear_timer_start(struct spear_timer *timer);
void spear_timer_stop(struct spear_timer *timer);
GPT counter value
The 16-bit GPT counter value can be read any time through the following API. Please note
that in case of an asynchronous operation, when the GPT runs on PLL3 and AHB is fed by
PLL1, due to different clock domains, the value reported by this API may not be valid.
Please refer to the GPT application note for more details on this.
/* This shall return the count value of the timer */
unsigned int spear_timer_read_counter(struct spear_timer *timer);
3.1.3
GPT driver usage
Two of these timers are used by the clock keeping and event generation framework of Linux
to maintain Linux time and generation of timer tick. They are defined using the GPT APIs to
configure, program and use the hardware timers. For details please refer to arch/arm/plat-
spear/time.c.
Clock source
One of the GPT timers acts as a free running timer used by Linux to maintain the time of
day. The clock source for Linux is a monotonic increasing timer used by the kernel to get
timer value at any time. For this, it needs to provide a callback to the kernel
(clocksource_read_cycles()) for reading the count value.
static cycle_t clocksource_read_cycles(void)
{
return (cycle_t)spear_timer_read_counter(clk_clksrc_tmr);
}
struct clocksource clocksource_gpt = {
.name
= "clock source",
.rating
= 200,
.read
= clocksource_read_cycles,
.mask
= 0xFFFF,
/* 16 bits */
.mult
= 0,
/* to be computed */
.shift = 20,
.flags
= CLOCK_SOURCE_IS_CONTINUOUS,
};
void hrt_clocksource_init(void)
{



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