例如 初始化EPWM定时器为10ms周期中断
在 使能该定时器中断后,MCU立刻产生中断,并非等到定时器定时周期才中断。但是仅第一次中断是这样,以后的周期中断是正确的。
请问是否寄存器哪里设置不对,谢谢。
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.
首先在配置PWM的时候需要将PWM的时钟关闭。
配置完成之后再打开PWM的时钟,即可不出现此问题。
以上问题说明,在配置PWM的时候,PWM已经在计数,因此第一次不对。