Part Number:TMS320F2800157
调用如下的EPWM_setActionQualifierContSWForceAction()函数给PWM输出0/1,相当于用软件的方式控制PWM输出0/1(而不是通过PWM的CMPA/CMPB寄存器的方式),
此时配置的PWM死区时间还有效吗?
//*****************************************************************************
//
//! Triggers a continuous software forced event.
//!
//! \param base is the base address of the EPWM module.
//! \param epwmOutput is the ePWM pin type.
//! \param output is the Action Qualifier output.
//!
//! This function triggers a continuous software forced Action Qualifier output
//! on ePWM A or B based on the value of epwmOutput.
//! Valid values for the parameters are:
//! – epwmOutput
//! – EPWM_AQ_OUTPUT_A – ePWMxA output
//! – EPWM_AQ_OUTPUT_B – ePWMxB output
//! – output
//! – EPWM_AQ_SW_DISABLED – Software forcing disabled.
//! – EPWM_AQ_SW_OUTPUT_LOW – Set output pins to low
//! – EPWM_AQ_SW_OUTPUT_HIGH – Set output pins to High
//!
//! \return None.
//
//*****************************************************************************
static inline void
EPWM_setActionQualifierContSWForceAction(uint32_t base,
EPWM_ActionQualifierOutputModule epwmOutput,
EPWM_ActionQualifierSWOutput output)
Yale Li:
John Pan 说:Triggers a continuous software forced event.
John Pan 说:This function triggers a continuous software forced Action Qualifier output
没有效果。因为DB模块添加死区是通过检测上升沿或下降沿实现的
而且既然输出已经固定为高或低了,也就不存在死区一说了
,
John Pan:
前面没有吧2问题描述清楚,我使用的场景是这样的:
EPWM_setActionQualifierContSWForceAction(High) —- PWM初始输出1
EPWM_setActionQualifierContSWForceAction(Low) —- 相当于用软件的方式,吧PWM输出从1变成0,有下降沿,此时死区时间有效吗
EPWM_setActionQualifierContSWForceAction(High) —- 相当于用软件的方式,吧PWM输出从0变成1,有上升降沿,此时区时间有效吗
EPWM_setActionQualifierContSWForceAction(Low) —- 相当于用软件的方式,吧PWM输出从1变成0,有下降沿,此时死区时间有效吗
,
Yale Li:
有效的,正如我上面所说,DB模块添加死区是通过检测上升沿或下降沿、然后在此基础上叠加延迟实现的