数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

AN3140 数据表(PDF) 5 Page - STMicroelectronics

部件名 AN3140
功能描述  How to configure the SPEAr3xx general purpose timers
PDF  14 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  STMICROELECTRONICS [STMicroelectronics]
网页  http://www.st.com
标志 STMICROELECTRONICS - STMicroelectronics

AN3140 数据表(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


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
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