简体   繁体   English

在PWM上触发stm32定时器

[英]Trigger stm32 timer on PWM

I'm new to stm32 timers and have a question concerning triggering.我是 stm32 定时器的新手,有一个关于触发的问题。

I would like to generate four squarewaves two of each complements of each other.我想生成四个方波,其中两个彼此互补。 That is the trivial part.那是微不足道的部分。

Now I would like to introduce a variable phaseshift between each of the two complementary signalgroups.现在我想在两个互补信号组中的每一个之间引入可变相移。 (Phaseshift PWM) (相移脉宽调制)

Now my question, can I trigger timer 2 on the falling or rising edge of a pwm signal produced by timer 1?现在我的问题是,我可以在定时器 1 产生的 pwm 信号的下降沿或上升沿触发定时器 2 吗?

Or is there another way for me to generate a phaseshift between those signals that's changeable during runtime?还是有另一种方法可以让我在运行时可变的信号之间产生相移?

A single advanced control timer (TIM1 or TIM8) can do all of this for you.一个高级控制定时器(TIM1 或 TIM8)可以为您完成所有这些工作。

See the reference manual section 17.3.11 "Complementary outputs and dead-time insertion".请参阅参考手册第 17.3.11 节“互补输出和死区时间插入”。

Alternatively you can chain timers, see section 13.3.15 of the same manual.或者,您可以链接计时器,请参阅同一手册的第 13.3.15 节。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM