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.
我查看了上面的EPWM配置和输出波形,基于AQ配置,我怀疑当从影子寄存器加载TBPRD时恰好错过了CTR = TBRPD事件,因为此处使用的计数器模式为DOWN模式。 因此,输出不会在整个周期内都保持为低电平,并导致导通时间延长(也就是之前说的会有小于半个周期的延迟)。 是否尝试过使用UP模式?
如果应用程序特别需要DOWN计数模式,那么这里提供的一项建议是如下修改动作限定符配置:
EPWM_setActionQualifierAction(base, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO); EPWM_setActionQualifierAction(base, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_DOWN_CMPA); EPWM_setActionQualifierAction(base, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO); EPWM_setActionQualifierAction(base, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_DOWN_CMPB);
即使TBPRD动态变化,这样设置也应该将输出置为低电平。