14012|3

8

帖子

0

TA的资源

一粒金砂(中级)

楼主
 

stm32定时器外部时钟源模式2与模式1的区别 [复制链接]

stm32定时器外部时钟源模式2与模式1的区别
此帖出自stm32/stm8论坛

最新回复

External clock mode1 (TI1 or TI2 pins) In this mode the external clock will be applied on timer input TI1 pin or TI2 pin. To do this: 1. Configure the timers to use the TIx pin as input: a) Select the pin to be used by writing CCxS bits in the TIMx_CCMR1 register. b) Select the polarity of the input: For the STM32F10x family: by writing CCxP in the TIMx_CCER register to select the rising or the falling edge; For the other families: by writing CCxP and CCxNP in the TIMx_CCER register to select the rising/falling edge, or both edges(a). c) Configure the filter and the prescaler if needed by writing the ICxF[3:0] bits in the TIMx_CCMR1: Select the timer TIx as the trigger input source by writing TS bits in the TIMx_SMCR register. Select the external clock mode1 by writing SMS=111 in the TIMx_SMCR register. Enable the corresponding channel by setting the CCEx bit in the TIMx_CCER register. 2. Select the timer TIx as the trigger input source by writing TS bits in the TIMx_SMCR register. 3. Select the external clock mode1 by writing SMS=111 in the TIMx_SMCR register. External clock mode2 (ETR pin) The external clock mode2 uses the ETR pin as timer input clock. To use this feature: 1. Select the external clock mode2 by writing ECE = 1 in the TIMx_SMCR register. 2. Configure, if needed, the prescaler, the filter and the polarity by writing ETPS [1:0], ETF [3:0] and ETP in the TIMx_SMCR register.  详情 回复 发表于 2013-5-19 00:15

点评

用 fwlib 吗? 具体指哪一项呢?  详情 回复 发表于 2013-5-15 11:26
点赞 关注
 

回复
举报

2606

帖子

0

TA的资源

五彩晶圆(初级)

推荐
 
External clock mode1 (TI1 or TI2 pins)
In this mode the external clock will be applied on timer input TI1 pin or TI2 pin. To do this:
1. Configure the timers to use the TIx pin as input:
a) Select the pin to be used by writing CCxS bits in the TIMx_CCMR1 register.
b) Select the polarity of the input:
For the STM32F10x family: by writing CCxP in the TIMx_CCER register to select
the rising or the falling edge;
For the other families: by writing CCxP and CCxNP in the TIMx_CCER register
to select the rising/falling edge, or both edges(a).

c) Configure the filter and the prescaler if needed by writing the ICxF[3:0] bits in the
TIMx_CCMR1:
Select the timer TIx as the trigger input source by writing TS bits in the
TIMx_SMCR register.
Select the external clock mode1 by writing SMS=111 in the TIMx_SMCR register.
Enable the corresponding channel by setting the CCEx bit in the TIMx_CCER
register.
2. Select the timer TIx as the trigger input source by writing TS bits in the TIMx_SMCR
register.
3. Select the external clock mode1 by writing SMS=111 in the TIMx_SMCR register.
External clock mode2 (ETR pin)
The external clock mode2 uses the ETR pin as timer input clock. To use this feature:
1. Select the external clock mode2 by writing ECE = 1 in the TIMx_SMCR register.
2. Configure, if needed, the prescaler, the filter and the polarity by writing ETPS [1:0], ETF
[3:0] and ETP in the TIMx_SMCR register.
此帖出自stm32/stm8论坛
 
个人签名工程 = 数学+物理+经济
 

回复

1803

帖子

0

TA的资源

五彩晶圆(高级)

沙发
 

回复 楼主 rauqwmourmhtkgn 的帖子

用 fwlib 吗?
具体指哪一项呢?
此帖出自stm32/stm8论坛
 
 

回复

2606

帖子

0

TA的资源

五彩晶圆(初级)

板凳
 
楼主请看如下说明,希望有所帮助:
The external clock timer is divided in two categories:
● External clock connected to TI1 or TI2 pins
● External clock connected to ETR pin
In these cases, the clock is provided by an external signal connected to TIx pins or ETR pin.
The maximum external clock frequency should be verified.
Note: 1 In addition to all these clock sources, the timer should be clocked with the APBx clock.
2 The external clocks are not directly feeding the prescaler, but they are first synchronized
with the APBx clock through dedicated logical blocks.
此帖出自stm32/stm8论坛
 
个人签名工程 = 数学+物理+经济
 
 

回复
您需要登录后才可以回帖 登录 | 注册

随便看看
查找数据手册?

EEWorld Datasheet 技术支持

相关文章 更多>>
关闭
站长推荐上一条 1/9 下一条

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved
快速回复 返回顶部 返回列表