TMS320F28035: EPWM的动作寄存器异常

Part Number: TMS320F28035
Other Parts Discussed in Thread: C2000WARE

异常描述如下:当芯片处于开发波状态时,按“配置成强制动作立即生效” + “关发波” + “还原强制动作过零生效”的顺序执行后发波无法按预期的关闭。

83f2ed831ea222a61b0d46c2cacd8335.png

  • 感谢您对TI产品的关注。
    我们正在核实您的问题,请等待我们的答复。

  • 您好

    在将RLDCSF设置为立即加载,然后写入AQCSFRC以将输出设置为低后,客户是否无法看到输出变低?

    是否有某种类型的跳闸事件正在超越预期的软件强制驱动事件?

    输出是否在不将RLDCSF更改为立即模式然后重新加载到ZRO的情况下变低?他们能否尝试直接设置为即时模式,看看他们的输出是否按预期变化?

  • 实际能看到发波被拉低的,表现就是预期要是发波关闭的关了后下个过零点自动恢复了。我现在的需求是:希望贵司能按我提供的步骤复现(就3句代码很容易测试),确认我所述的问题是否真实存在

  • 您好

    您是否有能复现此问题的示例项目?

  • 我用路径 \ti\c2000\C2000Ware_5_02_00_00\device_support\f2803x\examples\c28\epwm_updown_aq  下的例程加入了测试代码,试了是可以复现的。我没看到有插入压缩附件的地方,测试的代码也很少,你可以自己在例程文件里添加测试代码来进行测试。

    for(;;)
    {
        __asm(" NOP");

        if (s_testVar == 1)
        {
            s_testVar = 0;

            EPwm1Regs.AQSFRC.bit.RLDCSF = 0x3; // 配置成强制动作立即生效
            EPwm1Regs.AQCSFRC.all = 0x05; // 关发波
            EPwm1Regs.AQSFRC.bit.RLDCSF = 0x0; // 还原强制动作过零生效
        }

    }

  • 您好

    I am unable to replicate this issue.
    Please ensure the following.
    EPwm1Regs.TBCTL.bit.FREE_SOFT = 0x3;3
    When debgging, ePWM counters will stop counting and the output will always be low or whatever previous state it was at. Setting free soft to be free running then you should be okay.
  • 你把你的测试数据发出来看下。我给你再提供下我测试的视频,视频里一开始展示了不打断点按 “配置成强制动作立即生效” + “关发波” + “还原强制动作过零生效”最终得到的还是发波处于开启状态,视频最后展示了单步测试确认了在最后一步还原强制动作过零生效”执行时把已经配置成5的EPwm1Regs.AQCSFRC.all异常还原成0了。

  • 您好

    I see the issue you're referring to now.

    This is due to the switching from shadow to immediate then back to shadow. 

    When going from immediate back to shadow, the shadow registers have value of 0x0 and will reload this. 

    To work around this, you will have to write again to the shadow registers after switching from immediate mode.

    Try the following sequence. Also please ensure the FREE_SOFT is set to 0x3 so the TBCTR does not stop counting even while CPU is halted.

    EPwm1Regs.AQSFRC.bit.RLDCSF = 0x3; //Configure to force actions to take effect immediately
            EPwm1Regs.AQCSFRC.all = 0x05; //Guan Fabo
            EPwm1Regs.AQSFRC.bit.RLDCSF = 0x0; //Restore the forced action to zero crossing and take effect
            EPwm1Regs.AQCSFRC.all = 0x05; //Guan Fabo