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:使用单个 PWM 通道软件强制事件控制两个 ePWM 通道

Guru**** 2595805 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1117802/tms320f28379d-controlling-both-epwms-channels-with-a-single-pwm-channel-s-w-forcing-event

器件型号:TMS320F28379D

大家好、

我正在尝试使用 PWMB 中的持续软件强制事件来控制 ePWM 通道 A 和 B。  

我仍然需要为 CMPA 或 CMPB 强制执行相同的逻辑、即当我调用 EPwm6Regs.AQCSFRC.bit.CSFB = 01时;我希望通道 A 将设置为高电平、反之亦然(取决于强制事件)。

我认为、将死区控制的 IN_MODE 和 OUT_MODE 强制为3 (我无论如何都需要)可以解决这个问题。 我在初始化中依赖的设置如下:

EPwm6Regs.AQSFRC.bit.RLDCSF = 3;    //A software force event in AQSFRC is loaded immediately
//EPwm6Regs.AQCSFRC.bit.CSFA = 0;   // we can use this in code to force PWM A output,00 = forcing is disabled, 01=low 10 = high
EPwm6Regs.AQCSFRC.bit.CSFB = 01;   // we can use this in code to force PWM B output,00 = forcing is disabled, 01=low 10 = high
// PWMA is ignored on purpose because we want to force both channels with PWMB and veto with the TZ only channel A

EPwm6Regs.DBCTL.bit.IN_MODE = 3;                // PWMB is source for both channels
EPwm6Regs.DBCTL.bit.OUT_MODE = 3;               // DB full enable PWMxA is controlled from within DB BLOCK
EPwm6Regs.DBCTL.bit.POLSEL = PWM_ACTIVE_POL;    // PWM_ACTIVE_POL=1 Active low complementary (ALC) , PWM_ACTIVE_POL=2 Active high complementary (AHC)
EPwm6Regs.DBFED.all = 2*DEADTIME;               // Set dead-time (double than defined)
EPwm6Regs.DBRED.all = 2*DEADTIME;               // Set dead-time

非常感谢您提前提供的任何帮助、

Nicola   

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Nikola、

    我现在没有方便测试这种情况的硬件。

    您在 EPWMxA 上看到了什么行为?