PWM1A pwm1B 波形动作设置,我发现波形发生动作设置为互补波时,加入这个语句 EPwm1Regs.DBCTL.bit.POLSEL = 2; 波形并未改变,如果波形发生动作设置为非互补波时,加入这个语句 EPwm1Regs.DBCTL.bit.POLSEL = 2; 波形会变为互补波,请问这是为什么??
我看手册,EPwm1Regs.DBCTL.bit.POLSEL = 2; 语句意思为: 主动高互补(AHC)。 EPWMxB被反相
EPwm1Regs.AQCTLA.bit.CAU = 1; // Set PWM1A on event A, down count
EPwm1Regs.AQCTLA.bit.CAD = 2; // Clear PWM1A on event A, up count
EPwm1Regs.AQCTLB.bit.CBU = 1; // Set PWM1B on event B, up count
EPwm1Regs.AQCTLB.bit.CBD = 2; // Clear PWM1B on event B, down count
EPwm1Regs.DBCTL.bit.OUT_MODE = DB_FULL_ENABLE; // enable Dead-band module
EPwm1Regs.DBCTL.bit.POLSEL = 2; //EPWMxB被反相 //DB_ACTV_HI
EPwm1Regs.DBFED = 50; // FED = 25 TBCLKs 0.5us
EPwm1Regs.DBRED = 50; // RED = 25 TBCLKs 0.5us
这样设置会输出互补波!
EPwm1Regs.AQCTLA.bit.CAU = 1; // Set PWM1A on event A, down count
EPwm1Regs.AQCTLA.bit.CAD = 2; // Clear PWM1A on event A, up count
EPwm1Regs.AQCTLB.bit.CBU = 2; // Set PWM1B on event B, up count
EPwm1Regs.AQCTLB.bit.CBD = 1; // Clear PWM1B on event B, down count
EPwm1Regs.DBCTL.bit.OUT_MODE = DB_FULL_ENABLE; // enable Dead-band module
EPwm1Regs.DBCTL.bit.POLSEL = 2; //EPWMxB被反相 //DB_ACTV_HI
EPwm1Regs.DBFED = 50; // FED = 25 TBCLKs 0.5us
EPwm1Regs.DBRED = 50; // RED = 25 TBCLKs 0.5us
这样设置波形还是互补波!
请问这是为什么?
Green Deng:EPwm1Regs.DBCTL.bit.POLSEL = 2; 这个就是设置的PWMA不翻转,PWMB翻转。
不是很理解你的问题,你觉得波形应该出现什么情况的改变?
PWM1A pwm1B 波形动作设置,我发现波形发生动作设置为互补波时,加入这个语句 EPwm1Regs.DBCTL.bit.POLSEL = 2; 波形并未改变,如果波形发生动作设置为非互补波时,加入这个语句 EPwm1Regs.DBCTL.bit.POLSEL = 2; 波形会变为互补波,请问这是为什么??
我看手册,EPwm1Regs.DBCTL.bit.POLSEL = 2; 语句意思为: 主动高互补(AHC)。 EPWMxB被反相
EPwm1Regs.AQCTLA.bit.CAU = 1; // Set PWM1A on event A, down count
EPwm1Regs.AQCTLA.bit.CAD = 2; // Clear PWM1A on event A, up count
EPwm1Regs.AQCTLB.bit.CBU = 1; // Set PWM1B on event B, up count
EPwm1Regs.AQCTLB.bit.CBD = 2; // Clear PWM1B on event B, down count
EPwm1Regs.DBCTL.bit.OUT_MODE = DB_FULL_ENABLE; // enable Dead-band module
EPwm1Regs.DBCTL.bit.POLSEL = 2; //EPWMxB被反相 //DB_ACTV_HI
EPwm1Regs.DBFED = 50; // FED = 25 TBCLKs 0.5us
EPwm1Regs.DBRED = 50; // RED = 25 TBCLKs 0.5us
这样设置会输出互补波!
EPwm1Regs.AQCTLA.bit.CAU = 1; // Set PWM1A on event A, down count
EPwm1Regs.AQCTLA.bit.CAD = 2; // Clear PWM1A on event A, up count
EPwm1Regs.AQCTLB.bit.CBU = 2; // Set PWM1B on event B, up count
EPwm1Regs.AQCTLB.bit.CBD = 1; // Clear PWM1B on event B, down count
EPwm1Regs.DBCTL.bit.OUT_MODE = DB_FULL_ENABLE; // enable Dead-band module
EPwm1Regs.DBCTL.bit.POLSEL = 2; //EPWMxB被反相 //DB_ACTV_HI
EPwm1Regs.DBFED = 50; // FED = 25 TBCLKs 0.5us
EPwm1Regs.DBRED = 50; // RED = 25 TBCLKs 0.5us
这样设置波形还是互补波!
请问这是为什么?
user6102121:
回复 Green Deng:
问题解决了,是我对死区寄存器理解错了 ,不好意思
PWM1A pwm1B 波形动作设置,我发现波形发生动作设置为互补波时,加入这个语句 EPwm1Regs.DBCTL.bit.POLSEL = 2; 波形并未改变,如果波形发生动作设置为非互补波时,加入这个语句 EPwm1Regs.DBCTL.bit.POLSEL = 2; 波形会变为互补波,请问这是为什么??
我看手册,EPwm1Regs.DBCTL.bit.POLSEL = 2; 语句意思为: 主动高互补(AHC)。 EPWMxB被反相
EPwm1Regs.AQCTLA.bit.CAU = 1; // Set PWM1A on event A, down count
EPwm1Regs.AQCTLA.bit.CAD = 2; // Clear PWM1A on event A, up count
EPwm1Regs.AQCTLB.bit.CBU = 1; // Set PWM1B on event B, up count
EPwm1Regs.AQCTLB.bit.CBD = 2; // Clear PWM1B on event B, down count
EPwm1Regs.DBCTL.bit.OUT_MODE = DB_FULL_ENABLE; // enable Dead-band module
EPwm1Regs.DBCTL.bit.POLSEL = 2; //EPWMxB被反相 //DB_ACTV_HI
EPwm1Regs.DBFED = 50; // FED = 25 TBCLKs 0.5us
EPwm1Regs.DBRED = 50; // RED = 25 TBCLKs 0.5us
这样设置会输出互补波!
EPwm1Regs.AQCTLA.bit.CAU = 1; // Set PWM1A on event A, down count
EPwm1Regs.AQCTLA.bit.CAD = 2; // Clear PWM1A on event A, up count
EPwm1Regs.AQCTLB.bit.CBU = 2; // Set PWM1B on event B, up count
EPwm1Regs.AQCTLB.bit.CBD = 1; // Clear PWM1B on event B, down count
EPwm1Regs.DBCTL.bit.OUT_MODE = DB_FULL_ENABLE; // enable Dead-band module
EPwm1Regs.DBCTL.bit.POLSEL = 2; //EPWMxB被反相 //DB_ACTV_HI
EPwm1Regs.DBFED = 50; // FED = 25 TBCLKs 0.5us
EPwm1Regs.DBRED = 50; // RED = 25 TBCLKs 0.5us
这样设置波形还是互补波!
请问这是为什么?
Green Deng:
回复 user6102121:
好的,感谢反馈。