Motor de Búsqueda de Datasheet de Componentes Electrónicos
  Mexican  ▼
ALLDATASHEET.COM.MX

X  

RM0312 Datasheet(PDF) 113 Page - STMicroelectronics

No. de pieza RM0312
Descripción Electrónicos  STM8TL5xxx microcontroller family
PDF  275 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Fabricante Electrónico  STMICROELECTRONICS [STMicroelectronics]
Página de inicio  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

RM0312 Datasheet(HTML) 113 Page - STMicroelectronics

Back Button 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 RM0312 Datasheet HTML 114Page - STMicroelectronics RM0312 Datasheet HTML 115Page - STMicroelectronics RM0312 Datasheet HTML 116Page - STMicroelectronics RM0312 Datasheet HTML 117Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 113 / 275 page
background image
DocID022352 Rev 3
113/275
RM0312
16-bit general purpose timer (TIM2/TIM3)
170
17.3.6
Center-aligned mode (up/down counting)
In center-aligned mode, the counter counts from 0 to the auto-reload value (content of the
TIMx_ARR register) -1, generates a counter overflow event, then counts down to 0 and
generates a counter underflow event. Then it restarts counting from 0.
In this mode, the DIR direction bit in the TIMx_CR1 register cannot be written. It is updated
by hardware and gives the current direction of the counter.
The Figure 28 shows an example of this counting mode.
Figure 28. Counter in center-aligned mode
The update event is generated at each counter overflow and at each counter underflow.
Setting the bit UG in the TIMx_EGR register (by software or by using the clock/trigger mode
controller) also generates an update event. In this case, the counter restarts counting from
0, as well as the counter of the prescaler.
The update event (UEV) can be disabled by software setting the UDIS bit in 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 continues counting up and down, based on the current auto-reload
value.
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
will be 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 buffer of the prescaler is reloaded with the preload value (content of the TIMx_PSCR
register).
The auto-reload shadow register is updated with the preload value (content of the
TIMx_ARR register). Note that if the update source is a counter overflow, the auto-reload is
updated before the counter is reloaded, so that the next period is the expected one (the
counter is loaded with the new value).
Hereafter are some examples of the counter behavior for different clock frequencies.
Counter
Time
TIMx_ARR
Underflow
Overflow
Overflow
Underflow
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


Datasheet Descarga

Go To PDF Page


Enlace URL



¿ALLDATASHEET es útil para Ud.?  [ DONATE ] 

Todo acerca de Alldatasheet   |   Publicidad   |   Contáctenos   |   Política de Privacidad   |   Enlace a la hoja de datos    |   Intercambio de Enlaces   |   Lista de Fabricantes
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