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

X  

AN3140 数据表(PDF) 7 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) 7 Page - STMicroelectronics

Back Button 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 AN3140 Datasheet HTML 10Page - STMicroelectronics AN3140 Datasheet HTML 11Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 7 / 14 page
background image
AN3140
Scenario with slow CNT_Clk and fast READ_Clk
Doc ID 16997 Rev 1
7/14
3
Scenario with slow CNT_Clk and fast READ_Clk
In certain cases, for example when the timer is used by an operating system to generate the
system tick, the CNT_Clk (after prescaling) is usually much slower than READ_Clk. For
example, let’s suppose you need to generate a tick every 10 ms; the GPT with a clock
source of 48 MHz might be programmed using a ‘/32’ internal prescaler and a counter equal
to 15000.
This results in a great number (around 60) READ_Clk ‘sampling cycles’ for every single
CNT_Clk cycle. Or, in other words, CNT_Clk is about 60 times slower than READ_Clk.
Figure 4.
CNT_Clk at low frequency
Let’s see what happens if the CPU does three consecutive read operations instead of a
single one. Since the bit instability lasts much less than the CNT_Clk time period, we can
say that, out of 3 READ_Clk edges, only one will ever fall into the bit instability window. The
other two are stable.
Moreover, since CNT_Clk is about 60 times slower than READ_Clk, the two stable read
operations return counter values that differ by 1 in the worst case, which is when there is a
CNT_Clk rising edge between the first and third read operations. Of course, interrupts
should be disabled during the reads.
So, reading three times the counter and discharging the unstable value (if any) is a valid
workaround that can be used for all GPTs of SPEAr3xx in similar scenarios.
In general, this workaround is valid when the minimum period of CNT_Clk is greater than 3
times the read_cycle_time. The read_cycle_time depends on the CPU frequency, and also
on the way the reads are implemented, so they should be carefully evaluated.
READ_Clk
(PCLK == 83MHz)
CNT_Clk
(48MHz/32 == 1.5 MHz)
Bit_N
t0
t1
t2
t0: Bit_N is sampled in an unstable
state
t1 & t2: Bit_N is sampled in a
stable state. Samples are assumed
to happen every 3 READ_Clk cycles.



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