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

X  

RM0312 数据表(PDF) 109 Page - STMicroelectronics

部件名 RM0312
功能描述  STM8TL5xxx microcontroller family
PDF  275 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  STMICROELECTRONICS [STMicroelectronics]
网页  http://www.st.com
标志 STMICROELECTRONICS - STMicroelectronics

RM0312 数据表(HTML) 109 Page - STMicroelectronics

Back Button RM0312 Datasheet HTML 105Page - STMicroelectronics RM0312 Datasheet HTML 106Page - STMicroelectronics RM0312 Datasheet HTML 107Page - STMicroelectronics RM0312 Datasheet HTML 108Page - STMicroelectronics RM0312 Datasheet HTML 109Page - STMicroelectronics RM0312 Datasheet HTML 110Page - STMicroelectronics RM0312 Datasheet HTML 111Page - STMicroelectronics RM0312 Datasheet HTML 112Page - STMicroelectronics RM0312 Datasheet HTML 113Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 109 / 275 page
background image
DocID022352 Rev 3
109/275
RM0312
16-bit general purpose timer (TIM2/TIM3)
170
17.3.4
Up-counting mode
In up-counting mode, the counter counts from 0 to a user-defined compare value (content of
the TIMx_ARR register), then restarts from 0 and generates a counter overflow event, and
an update event (UEV) if the UDIS bit is 0 in the TIMx_CR1 register.
Figure 22 shows an example of this counting mode.
Figure 22. Counter in up-counting mode
An update event can also be generated by setting the bit UG in the TIMx_EGR register (by
software or by using the trigger controller).
The UEV event can be disabled by software by setting the UDIS bit in the TIMx_CR1
register. This is to avoid updating the shadow registers while writing new values in the
preload registers. Then no update event will occur until UDIS bit has been written to 0.
However, the counter restarts from 0, as well as the counter of the prescaler (but the
prescaler division factor does not change). In addition, if the URS bit (update request
selection) in TIMx_CR1 register is set, setting the UG bit generates an update event UEV
but without setting the UIF flag (thus no interrupt request is sent). This is to avoid generating
both update and capture interrupts when clearing the counter on the capture event.
When an update event occurs, all the registers are updated and the update flag (UIF bit in
TIMx_SR1 register) is set (depending on the URS bit):
The auto-reload shadow register is updated with the preload value (TIMx_ARR),
The buffer of the prescaler is reloaded with the preload value (content of the TIMx_PSCR
register).
The following figures show two examples of the counter behavior for different clock
frequencies when TIMx_ARR=36h.
In Figure 23 the prescaler divider is set to 2, so the counter clock (CK_CNT) frequency is at
half the frequency of the the prescaler clock source (CK_PSC).
In Figure 23 the autoreload preload is disabled (ARPE=0), so the shadow register is
changed immediately and counter overflow occurs when upcounting reaches 36h. This
generates an update event.
Counter
TIMx_ARR
Overflow
Overflow
Overflow
Overflow
0



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


数据表 下载

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