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

X  

AN3140 Datasheet(PDF) 5 Page - STMicroelectronics

Part # AN3140
Description  How to configure the SPEAr3xx general purpose timers
PDF  14 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN3140 Datasheet(HTML) 5 Page - STMicroelectronics

  AN3140 Datasheet HTML 1Page - STMicroelectronics AN3140 Datasheet HTML 2Page - STMicroelectronics AN3140 Datasheet HTML 3Page - STMicroelectronics AN3140 Datasheet HTML 4Page - STMicroelectronics AN3140 Datasheet HTML 5Page - STMicroelectronics AN3140 Datasheet HTML 6Page - STMicroelectronics AN3140 Datasheet HTML 7Page - STMicroelectronics AN3140 Datasheet HTML 8Page - STMicroelectronics AN3140 Datasheet HTML 9Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 5 / 14 page
background image
AN3140
Reading a free-running timer counter
Doc ID 16997 Rev 1
5/14
2
Reading a free-running timer counter
When the GPT interrupt is enabled, the interrupts generated at each timer wrap-around
condition are always triggered at the right frequency, however reading the timer counter
when the timer itself is active and free-running may present some difficulties which are
described below.
In a simplified scenario, a hardware timer block can be seen just as a simple counter
register with two input clocks:CNT_Clk for incrementing/decrementing the counter and
READ_Clk for synchronizing the READ accesses of the bus the timer is connected to.
Figure 2.
Simplified timer
The two clocks can be either synchronous, coming from the same source PCLK, or
completely asynchronous, for example coming from two different sources.
When the two clocks involved in the scenario are asynchronous, then the value retrieved by
the CPU in a read counter operation is unpredictable, and might be completely different from
the real value in the register.
The situation is due to the fact that the READ_Clk is sampling the counter bits while they are
in a transitioning, unstable phase.
Figure 3.
Sampling a counter bit in an unstable state
The above scenario may take place during any kind of transition (0->1 or 1->0) and for any
bit in the register.
If one of the bits impacted has a large weight (significant position) in the counter, then the
difference between the value returned in the read transaction and the real value of the
counter can be very large.
CNT_Clk
0
0
1
0
1
READ_Clk
CNT_Clk
READ_Clk
Bit_N
t0 t1 t2
t0: On CNT_Clk rising edge, Bit_N
start a 0->1 transitioning
t1: On READ_Clk rising edge, Bit_N is
sampled in an unstable state
t2: Bit_N reaches a stable state



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14


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