| Electronic Components Datasheet Search |
|
STM32W108CB Datasheet(PDF) 167 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
STM32W108CB Datasheet(HTML) 167 Page - STMicroelectronics |
|
167 / 278 page ![]() STM32W108HB STM32W108CC STM32W108CB STM32W108CZ General-purpose timers Doc ID 16252 Rev 14 167/278 External clock source mode 2 This mode is selected by writing ECE = 1 in the TIMx_SMCR register. The counter can count at each rising or falling edge on the external trigger input ETR. The EXTRIGSEL bits in the TIMx_OR register select a clock signal that drives ETR, as shown in Table 33. 00 PCLK (peripheral clock). When running from the 24 MHz HSE OSC, the PCLK frequency is 12 MHz. When the 12 MHz HSI RC oscillator is in use, the frequency is 6 MHz. 01 Calibrated 1 kHz internal RC oscillator 10 Optional 32 kHz HSE OSC 11 TIMxCLK pin. If the CLKMSKEN bit in the TIMx_OR register is set, this signal is AND'ed with the TIMxMSK pin providing a gated clock input. Figure 29 gives an overview of the external trigger input block. Figure 29. 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 ETF = 0000 in the TIMx_SMCR register. ● Set the prescaler by writing ETPS = 01 in the TIMx_SMCR register. ● Select rising edge detection on ETR by writing ETP = 0 in the TIMx_SMCR register. ● Enable external clock mode 2 by writing ECE = 1 in the TIMx_SMCR register. ● Enable the counter by writing 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. Table 33. EXTRIGSEL clock signal selection EXTRIGSEL bits Clock signal selection ETR 0 1 TIMx_SMCR divider /1, /2, /4, /8 ETRP filter downcounter CK_INT TIMx_SMCR TIMx_SMCR CK_INT Encoder mode External clock mode 1 External clock mode 2 Internal clock mode ETRF TRGI TI1F TI2F or or or (Internal clock) CK_PSC TIMx_SMCR SMS[2:0] ETR ECE ETF[3:0] ETPS[1:0] ETP |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| 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 |