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.

TMS320F280049C中AQ的T1和T2事件具体从哪里来,如何正确使用



最近测试用DCAEVT1做为AQ的T1/T2事件进行封PWM发现不起作用,我理解T1/T2事件来源DC模块的DCAEVT1.force,只要DCAEVT1.force产生就会产生AQ的T1/T2事件(中间没有什么使能标志)

我的配置

EALLOW;
// AQ
EPwm2Regs.AQTSRCSEL.bit.T1SEL = 0; // AQ T1 Event Source Select DCAEVT1
EPwm2Regs.AQCTLA.bit.CAU = AQ_CLEAR; // set actions for EPWM2A
EPwm2Regs.AQCTLA.bit.CAD = AQ_SET; //
EPwm2Regs.AQCTLA2.bit.T1U = AQ_CLEAR; // set actions for EPWM2A
EPwm2Regs.AQCTLA2.bit.T1D = AQ_CLEAR; //

// DC
// Digital Compare Trip Select
EPwm2Regs.DCTRIPSEL.bit.DCAHCOMPSEL = DC_TRIPIN4; // Digital Compare A High Input Select TRIPIN4(DCAEVT1 For OSH)

// Digital Compare A Control
EPwm2Regs.DCACTL.bit.EVT1SRCSEL = DC_EVT1; // 0: Source Is DCAEVT1 Signal 1: Source Is DCEVTFILT Signal
EPwm2Regs.DCACTL.bit.EVT1FRCSYNCSEL = DC_EVT_SYNC; // 0: Source is synchronized with EPWMCLK 1: Source is passed through asynchronously
EPwm2Regs.DCACTL.bit.EVT1SOCE = DC_SOC_DISABLE; // SOC Generation Disabled
EPwm2Regs.DCACTL.bit.EVT1SYNCE = DC_SYNC_DISABLE; // SYNC Generation Disabled
EPwm2Regs.DCACTL.bit.EVT2SRCSEL = DC_EVT2; // 0: Source Is DCAEVT2 Signal 1: Source Is DCEVTFILT Signal
EPwm2Regs.DCACTL.bit.EVT2FRCSYNCSEL = DC_EVT_SYNC; // 0: Source is synchronized with EPWMCLK 1: Source is passed through asynchronously

// TZ
EPwm2Regs.TZCTL.bit.DCAEVT1 = TZ_NO_CHANGE;

EPwm2Regs.TZDCSEL.bit.DCAEVT1 = TZ_DCAH_HI;
EDIS;