TI中文支持网
TI专业的中文技术问题搜集分享网站

TMS320F280025C: CMPSS触发TZ中断,可以单独关闭EPWMA,EPWMB吗?

Part Number:TMS320F280025C

CMPSS触发TZ中断,可以单独关闭EPWMA,EPWMB吗?我现在的代码会同时关闭EPWMA和EPWMB.我想单独关闭A或者B

{// Enable CMPSS and configure the negative input signal to come from the DACCMPSS_enableModule(CMPSS3_BASE);// Use VDDA as the reference for the DAC and set DAC value to midpoint for arbitrary reference.CMPSS_configDAC(CMPSS3_BASE, CMPSS_DACREF_VDDA);ASysCtl_selectCMPLPMux(ASYSCTL_CMPLPMUX_SELECT_3, 3);//LDr2// Configure the output signals. Both CTRIPH will be fed by the asynchronous comparator output.//LDr1CMPSS_configHighComparator(CMPSS3_BASE, CMPSS_INSRC_DAC);// Threshold drive by GPIO or input DACCMPSS_setDACValueHigh(CMPSS3_BASE, max_dac_cmpss);// Define thresholdCMPSS_configOutputsHigh(CMPSS3_BASE, CMPSS_TRIP_SYNC_COMP);// Set output comparator (synchronous or asynchronous)//LDr2CMPSS_configLowComparator(CMPSS3_BASE, CMPSS_INSRC_DAC);// Threshold drive by GPIO or input DACCMPSS_setDACValueLow(CMPSS3_BASE, max_dac_cmpss);// Define thresholdCMPSS_configOutputsLow(CMPSS3_BASE, CMPSS_TRIP_SYNC_COMP);// Set output comparator (synchronous or asynchronous)// Configure TRIP to be CTRIP1H using the ePWM X-BAR. Attach CMPSS output to TRIPINx via EPWMXBAR moduleXBAR_setEPWMMuxConfig(XBAR_TRIP8, XBAR_EPWM_MUX05_CMPSS3_CTRIPL);//LDr2XBAR_enableEPWMMux(XBAR_TRIP8, XBAR_MUX05);//LDr2EPWM_selectDigitalCompareTripInput(base, EPWM_DC_TRIP_TRIPIN8, EPWM_DC_TYPE_DCBH);EPWM_setTripZoneDigitalCompareEventCondition(base, EPWM_TZ_DC_OUTPUT_B1, EPWM_TZ_EVENT_DCXH_HIGH);EPWM_setTripZoneAction(base, EPWM_TZ_ACTION_EVENT_TZB, EPWM_TZ_ACTION_LOW);EPWM_enableTripZoneSignals(base, EPWM_TZ_SIGNAL_DCBEVT1);EPWM_forceTripZoneEvent(base,EPWM_TZ_FORCE_EVENT_DCBEVT1);EPWM_clearOneShotTripZoneFlag(base,EPWM_TZ_OST_FLAG_DCBEVT1);EPWM_clearTripZoneFlag(base, (EPWM_TZ_INTERRUPT | EPWM_TZ_FLAG_DCBEVT1));
}

Yale Li:

可以,请看一下spruin7b_TMS320F28002x Real-Time Microcontrollers Technical Reference Manual (Rev. B)第1935页17.17.2.47 TZCTL Register (Offset = 84h) [Reset = 0h]:

,

songdan shi:

  这样配置还是会同时关闭EPWM2A,EPWM2B

,

Yale Li:

EPWM2的波形是怎么生成的?能不能简单描述一下各个子模块的配置?有没有使用DB?

赞(0)
未经允许不得转载:TI中文支持网 » TMS320F280025C: CMPSS触发TZ中断,可以单独关闭EPWMA,EPWMB吗?
分享到: 更多 (0)