STM32 - 定时器的设定 - 基础- 06 - OCxREF signal - Clearing the OCxREF signal on an external event

OCxREF signal 作为捕捉比较的定制化参考波形在对输出波形的配置上占有巨大的影响。如何将这个信号和外部输入的事件联系起来,能给系统的设计带来更多的可选择性。


The OCxREF signal for a given channel can be driven Low by applying a High level to the ETRFETRF:External Trigger input) input (OCxCE enable bit of the corresponding TIMx_CCMRx register set to ‘1’).

The OCxREF signal remains Low until the next update event, UEV, occurs.

This function can only be used in output compare and PWM modes, and does not work in forced mode.


For example, the ETR signal can be connected to the output of a comparator to be used for current handling.

In this case, the ETR must be configured as follow:

1. The External Trigger Prescaler should be kept off: bits ETPS[1:0] of the TIMx_SMCR register set to ‘00’.

2. The external clock mode 2 must be disabled: bit ECE of the TIMx_SMCR register set to ‘0’.

3. The External Trigger Polarity (ETP) and the External Trigger Filter (ETF) can be configured according to the user needs.

 

 

 

Figure 90 shows the behavior of the OCxREF signal when the ETRF Input becomes High, for both values of the enable bit OCxCE. In this example, the timer TIMx is programmed in PWM mode.

 

 

 


参考:

STM32 - 定时器的设定 - 基础- 02 - Capture/compare channels 和相关设置寄存器

https://blog.csdn.net/yellow_hill/article/details/102083981

 

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Franklin

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值