如果在初始化时给CMPA与CMPB固定的值,而不在ADC采样中赋值,则相位是可以的。
但当在在中断中由环路计算重新给PWM1与PWM2的CMPA与CMPB赋值,它们的相位差不是180度的相位差,而是变成了153度。
中断是ADC中断
下面是PWM1与PWM2的初始化:
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.