我发现PWM用户模块估计输出周期增加一个偏移等于你的外部时钟的1 CLK周期。因此,公式最后保持:Tou= n周期*TCLK+1CyCuryCLK;(其中n期为计数器周期,CLK输入RISNG边数计算PWM输出方波周期)。我认为这是由于一种预充电或设置时间TE PWM UM需要再次充电计数器中的值或一旦倒计时结束中断。我还没有在PWM数据表中找到任何关于这个的说法。谁能证实这个理论,或者我错了?谢谢大家。
以上来自于百度翻译
以下为原文
I have found the PWM user modules es
timate the output period adding an Offset equal
to 1 clk cycle of your external clock.
Therefore the formula remains finally:
Tout= nºPERIOD*Tclk+1cycle_clk;
(Where nºPERIOD is the counter PERIOD, the number of clk input risng edges to calculate
the PWM output square wave period).
I have supposed it's due to a kind of precharge or setup time te PWM UM needs to charge again the values
in the counter or make the interrupts once the countdown is over.
I haven't find any statement about this in the PWM datasheet.
Anyone could confirm that theory or I'm wrong?
Thanks for all.
0