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.

TI28027ePWM的LLC的例程仿真暂停时PWM1A1B一高一低



我将28027 DATAsheet EPWM 模块上的LLC的驱动波形的程序运行后,周期占空比死区都是我想要的样子,但是当我仿真点击暂停的时候,PWM的波形就消失了,

EPWM1A和EPWM1B就一高一低,并且好像是随机的一高一低,有的时候epwm1a高有的时候epwm1B高。

这个问题是很致命的如果我在调试,那么直接就爆了

所以求求大神告诉我,怎么样在暂停的时候让他们都输出低电平。

  • 你可以设置以下寄存器 。

    TBCTL -> 15:14 Free Soft

    Bit Field Value Description
    15:14 FREE, SOFT Emulation Mode Bits. These bits select the behavior of the ePWM time-base counter during
    emulation events:
    00 Stop after the next time-base counter increment or decrement
    01 Stop when counter completes a whole cycle:
    Up-count mode: stop when the time-base counter = period (TBCTR = TBPRD)
    • Down-count mode: stop when the time-base counter = 0x0000 (TBCTR = 0x0000)
    • Up-down-count mode: stop when the time-base counter = 0x0000 (TBCTR = 0x0000)
    1X Free run

  • 您好,我按照您的方法设置了,我是这么做的 EPwm1Regs.TBCTL.bit.FREE_SOFT = 0x1;结果暂停的时候还是一高一低,我设置成0x2,就是暂停的时候还是正常的PWM设置成0x0就还是一高一低。不好意思啊,我太菜了。。。

  • 如果是0x01,是有可能一高一低的,他只是完成当前cycle,而完成了当前周期,结束时并不一定是0的,这个要看PWM的AQ的设置决定,你现在设置成0X02是什么情况?