TI E2E 英文论坛海量技术问答的中文版全新上线,可点击相关论坛查看,或在站内搜索 “参考译文” 获取。

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.

TMS320F28066: PWM 边界--PRD ZERO

Part Number: TMS320F28066

设置了PWM1A,PWM1B互补+使能死区功能。

如何实现EPwm1Regs.CMPA.half.CMPA = 0时,上管全开,下管全关

配置如下:

EPwm1Regs.AQCTLA.bit.CAU = 0x2;     // set PWMxA on up = CMPA

EPwm1Regs.AQCTLA.bit.CAD = 0x1;     // clear PWMxA on down = CMPA

EPwm1Regs.AQCTLA.bit.PRD = 0x2;          // CNT = set on PRD---边界动作设置

EPwm1Regs.AQCTLA.bit.ZRO = 0x1;      // CNT = clear on Zero---边界动作设置

EPwm1Regs.DBCTL.bit.IN_MODE = 0x0; // IN_mode selection
EPwm1Regs.DBCTL.bit.POLSEL = 0x2; // Active high complementary
EPwm1Regs.DBRED = DeadBand_1us; //dead timered:
EPwm1Regs.DBFED = DeadBand_1us; //dead timefed
EPwm1Regs.DBCTL.bit.OUT_MODE = 0x3; // Deadband fully enabled

想要达到效果如最下面TI TRM文档里面的,EPwm1Regs.CMPA.half.CMPA = 0时,上管全开,下管全关

但是由于死区存在,上管时钟输出是一个叠加了死区的高频信号,

有什么办法可以设置全开吗,要设置ACTSFA寄存器 的FORCE HIGH?

  • 你说的设置AQ寄存器的方法估计不行,因为死区的动作是在AQ之后的

    根据上面的PWM模块原理图,要在死区的基础上做到全开全关,只能考虑TZ模块了

  • 上午搞错了,配置为这样,给定CMPA=0,是可以输出常高电平的。

    限幅的地方按照例程最小限CMPA = 1了,所以死区一直都在起作用。

    按照如下配置,可以实现CMPA=0,PWM输出常高,

    只是是CMPA非0,死区就一直起作用了,

    EPwm1Regs.AQCTLA.bit.CAU = 0x2;     // set PWMxA on up = CMPA

    EPwm1Regs.AQCTLA.bit.CAD = 0x1;     // clear PWMxA on down = CMPA

    EPwm1Regs.AQCTLA.bit.PRD = 0x2;          // CNT = set on PRD---边界动作设置

    EPwm1Regs.AQCTLA.bit.ZRO = 0x1;      // CNT = clear on Zero---边界动作设置