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

X  

RM0312 Datasheet(PDF) 120 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) 120 Page - STMicroelectronics

Back Button RM0312 Datasheet HTML 116Page - STMicroelectronics RM0312 Datasheet HTML 117Page - STMicroelectronics RM0312 Datasheet HTML 118Page - STMicroelectronics RM0312 Datasheet HTML 119Page - STMicroelectronics RM0312 Datasheet HTML 120Page - STMicroelectronics RM0312 Datasheet HTML 121Page - STMicroelectronics RM0312 Datasheet HTML 122Page - STMicroelectronics RM0312 Datasheet HTML 123Page - STMicroelectronics RM0312 Datasheet HTML 124Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 120 / 275 page
background image
16-bit general purpose timer (TIM2/TIM3)
RM0312
120/275
DocID022352 Rev 3
Trigger gated mode
The counter can be enabled depending on the level of a selected input.
In the following example, the up-counter counts only when TI1 input is low:
1.
Configure the channel 1 to detect low levels on TI1. Configure the input filter duration
(in this example, we don’t need any filter, so we keep IC1F=0b0000). The capture
prescaler is not used for triggering, so you don’t need to configure it. The CC1S bits
select the input capture source only, and do not need to be configured either. Write
CC1P=1 in TIMx_CCER1 register to validate the polarity (and detect low level only).
2.
Configure the timer in trigger gated mode by writing SMS=0b101 in TIMx_SMCR
register. Select TI1 as the input source by writing TS=101 in TIMx_SMCR register.
3.
Enable the counter by writing CEN=1 in the TIMx_CR1 register (in trigger gated mode,
the counter doesn’t start if CEN=0, whatever is the trigger input level).
The counter starts counting on the internal clock as long as TI1 is low and stops as soon as
TI1 becomes high. The TIF flag is set both when the counter starts or stops.
The delay between the rising edge on TI1 and the actual reset of the counter is due to the
resynchronization circuit on TI1 input.
Figure 38. Control circuit in trigger gated mode
Combining trigger modes with external clock mode 2
The external clock mode 2 can be used in addition to another trigger mode. In this case,
ETR is used as external clock input, and another input can be selected as trigger input (in
trigger standard mode, trigger reset mode or trigger gated mode). Take care that you must
not select ETR as TRGI (through the TS bits in TIMx_SMCR register).
In the following example, the up-counter counts at each rising edge on ETR as soon as a
rising edge has occured on TI1 (standard trigger mode with external ETR clock):
Configure the external trigger input circuit by writing the TIMx_ETR register. In this
example, we don’t need any filter and write ETF=0b0000. Write ETPS=00 to disable
the prescaler, ETP=0 to detect rising edges on ETR and ECE=1 to enable the external
clock mode 2.
Configure the channel 1 to detect rising edges on TI1. Configure the input filter duration
(in this example, we don’t need any filter, so we keep IC1F=0b0000). The capture
prescaler is not used for triggering, so you don’t need to configure it. The CC1S bits
select the input capture source only, and do not need to be configured either. Write
CC1P=0 in TIMx_CCER1 register to select rising edge polarity.
COUNTER CLOCK = CK_CNT = CK_PSC
COUNTER REGISTER
35 36 37 38
32 33
34
TI1
31
30
CNT_EN
TIF
Write TIF=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