| 数据搜索系统,热门电子元器件搜索 |
|
RM0312 数据表(PDF) 118 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
RM0312 数据表(HTML) 118 Page - STMicroelectronics |
|
118 / 275 page ![]() 16-bit general purpose timer (TIM2/TIM3) RM0312 118/275 DocID022352 Rev 3 The counter counts once each 2 ETR rising edges. The delay between the rising edge on ETR and the actual reset of the counter is due to the resynchronization circuit on the ETRP signal. Figure 35. Control circuit in external clock mode 2 17.4.5 Trigger synchronization There are four trigger inputs (refer to Table 33: Glossary of internal timer signals on page 103): • ETR • TI1 • TI2 • TRGO from other timers The TIMx timer can be synchronized with an external trigger in three modes: trigger standard mode, trigger reset mode and trigger gated mode. Trigger standard mode The counter can start in response to an event on a selected input. In the following example, the up-counter starts in response to a rising edge on TI2 input: • Configure the channel 2 to detect rising edges on TI2. Configure the input filter duration (in this example, we don’t need any filter, so we keep IC2F=0b0000). The capture prescaler is not used for triggering, so you don’t need to configure it. TI2S bits are selecting the input capture source only, and don’t need to be configured too. Write CC2P=0 in TIMx_CCER1 register to select rising edge polarity. • Configure the timer in trigger mode by writing SMS=0b110 in the TIMx_SMCR register. Select TI2 as the input source by writing TS=0b110 in the TIMx_SMCR register. When a rising edge occurs on TI2, the counter starts counting on the internal clock and the TIF flag is set. The delay between the rising edge on TI2 and the actual reset of the counter is due to the resynchronization circuit on TI2 input. COUNTER CLOCK = CK_CNT = CK_PSC COUNTER REGISTER 35 36 34 ETR CNT_EN fMASTER ETRP ETRF |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 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 |