English
Language : 

EM351 Datasheet, PDF (131/240 Pages) List of Unclassifed Manufacturers – High-Performance, Integrated ZigBee/802.15.4 System-on-Chip
EM351 / EM357
Table 9-2. TIM_EXTRIGSEL Clock Signal Selection
TIM_EXTRIGSEL bits Clock Signal Selection
00
PCLK (peripheral clock). When running from the 24 MHz crystal oscillator, the PCLK
frequency is 12 MHz. When the 12 MHz RC oscillator is in use, the frequency is 6 MHz.
01
Calibrated 1 kHz internal RC oscillator
10
Optional 32.786 kHz clock
11
TIMxCLK pin. If the TIM_CLKMSKEN bit in the TIMx_OR register is set, this signal is
AND’ed with the TIMxMSK pin providing a gated clock input.
Figure 9-15 gives an overview of the external trigger input block.
Figure 9-15. External Trigger Input Block
For example, to configure the up-counter to count each 2 rising edges on ETR, use the following procedure:
ƒ As no filter is needed in this example, write TIM_ETF = 0000 in the TIMx_SMCR register.
ƒ Set the prescaler: Write TIM_ETPS = 01 in the TIMx_SMCR register.
ƒ Select rising edge detection on ETR: WriteTIM_ETP = 0 in the TIMx_SMCR register.
ƒ Enable external clock mode 2: Write TIM_ECE = 1 in the TIMx_SMCR register.
ƒ Enable the counter: Write TIM_CEN = 1 in the TIMx_CR1 register.
The counter counts once each 2 ETR rising edges. The delay between the rising edge on ETR and the actual
clock of the counter is due to the resynchronization circuit on the ETRP signal.
Figure 9-16 illustrates counting every 2 rising edges of ETR using external clock mode 2.
9-11
Preliminary
120-035X-000D