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.

TMS320F28379D芯片的EPWM重置TBPRD和COMPA

Other Parts Discussed in Thread: TMS320F28379D

hello,everybody

    现在我使用TMS320F28379D芯片的EPWM模块。我想通过ADC采集数据,然后对采集数据进行处理,进一步调节EPWM的频率。

   目前,上述部分功能代码是放在ADC中断函数中的。

   以下是我的问题,

          如果在ADC中断函数中,我调节了PWM的频率(TBPRD值),会影响的PWM当前频率吗?还是说这个TBPRD只有下个周期才起效?

  • TBPRD的更新和CMPA,CMPB是类似的,如果TBPRD配置为shadow mode(TBCTL寄存器的PRDLD位),那么在TBCTR等于0的时候更新,如果TBPRD配置为立即模式,那么在改变TBPRD的值后会立即生效。
    具体可以看一下芯片TRM的15.4.3.1 Time-Base Period Shadow Register章节内容。
x 出现错误。请重试或与管理员联系。