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

X  

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

Back Button RM0312 Datasheet HTML 104Page - STMicroelectronics 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 Next Button
Zoom Inzoom in Zoom Outzoom out
 108 / 275 page
background image
16-bit general purpose timer (TIM2/TIM3)
RM0312
108/275
DocID022352 Rev 3
17.3.1
Reading and writing to the 16-bit counter
There is no buffering when writing the counter. Both TIMx_CNTRH and TIMx_CNTRL can
be written at any time, so it is suggested not to write a new value into the counter while it is
running to avoid loading a wrong intermediate content.
An 8-bit buffer is implemented for the read. The user must read the MS byte first, then the
LS byte value is buffered automatically, as described in Figure 21. This buffered value
remains unchanged until the 16-bit read sequence is completed.
Note:
Do not use the LDW instruction to read the 16-bit counter, because it reads the LS byte first,
and would return a wrong result.
Figure 21. 16-bit read sequence for the counter (TIMx_CNTR)
17.3.2
Write sequence for 16-bit TIMx_ARR register
16-bit values are loaded in the TIMx_ARR
register through preload registers. This must be
performed by two write instructions, one for each byte. The MS byte must be written first.
The shadow register update is blocked as soon as the MS byte has been written, and stays
blocked until the LS byte has been written. Do not use the LDW instruction, as this writes
the LS byte first, and would produce wrong results in this case.
17.3.3
Prescaler
The prescaler is based on a 7-bit counter controlled through a 3-bit register (in TIMx_PSCR
register). It can be changed on the fly as this control register is buffered. It can divide the
counter clock frequency by 1, 2, 4, 8, 16, 32, 64 or 128.
The counter clock frequency is calculated as follows:
fCK_CNT = fCK_PSC/2(PSCR[2:0])
The new prescaler value is taken into account in the following period (after the next counter
update event).
is buffered
Read
At t0
Read
Returns the buffered
LS Byte value at t0
At t0 +Dt
Other
instructions
Beginning of the sequence
Sequence completed
LS Byte
LS Byte
MS byte



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