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.

TMS320F28379D: CMPSS Triggering on PWM frequency change

Part Number: TMS320F28379D
Other Parts Discussed in Thread: SYSCONFIG

I am starting work with the CMPSS.


Testing by itself:

As a test, I have CMPSS5 DACH set to 2048.  If I connect GND to the pin, PWM works as expected. If I connect 3.3V, the PWM output is disabled, as expected.

However, if I set CMPSS5 DACH to 20 and connect the pin to GND, what I observe is:

  • If the PWM starts at 100% duty cycle, everything seems to be okay
  • If I change the PWM duty cycle, the CMPSS5 trips and the PWM output is disabled.
  • The ADC reading on the shared pin shows '0' in the result register

The PWM is triggering ADC sampling of the same pin at 10kHz.  

Any suggestions on why changing the duty of the epwm channel triggering ADC conversions on the same pin as CMPSS could cause the CMPSS to trip?

Some details from my project are below.  I'm testing with the LaunchPad_XL for the 28379D.

Thanks!

CMPSS/Xbar configuration:

CMPSS_enableModule(CMPSS5_BASE);
CMPSS_configHighComparator(CMPSS5_BASE, CMPSS_INSRC_DAC);

CMPSS_configDAC(CMPSS5_BASE, CMPSS_DACREF_VDDA | CMPSS_DACVAL_SYSCLK | CMPSS_DACSRC_SHDW);
CMPSS_setDACValueHigh(CMPSS5_BASE, 20);


CMPSS_configFilterHigh(CMPSS5_BASE, 0x3FF, 32, 31);
CMPSS_initFilterHigh(CMPSS5_BASE);


CMPSS_configOutputsHigh(CMPSS5_BASE, CMPSS_TRIP_SYNC_COMP | CMPSS_TRIPOUT_SYNC_COMP);

// Configure ePWM XBAR
XBAR_setEPWMMuxConfig(XBAR_TRIP4, XBAR_EPWM_MUX08_CMPSS5_CTRIPH);
XBAR_enableEPWMMux(XBAR_TRIP4, XBAR_MUX08);

// Configure output XBAR
XBAR_setOutputMuxConfig(XBAR_OUTPUT2, XBAR_OUT_MUX08_CMPSS5_CTRIPOUTH);
XBAR_enableOutputMux(XBAR_OUTPUT2, XBAR_MUX08);

PWM Configuration:

EPWM_setTripZoneAction(EPWM4_BASE, EPWM_TZ_ACTION_EVENT_TZA, EPWM_TZ_ACTION_LOW);
EPWM_setTripZoneAction(EPWM4_BASE, EPWM_TZ_ACTION_EVENT_TZB, EPWM_TZ_ACTION_LOW);

EPWM_setTripZoneDigitalCompareEventCondition(EPWM4_BASE, EPWM_TZ_DC_OUTPUT_B1, EPWM_TZ_EVENT_DCXH_HIGH);

EPWM_enableDigitalCompareTripCombinationInput(EPWM4_BASE, EPWM_DC_COMBINATIONAL_TRIPIN4, EPWM_DC_TYPE_DCBH);

EPWM_enableTripZoneSignals(EPWM4_BASE, EPWM_TZ_SIGNAL_DCBEVT1);

EPWM_setDigitalCompareEventSource(EPWM4_BASE, EPWM_DC_MODULE_B, EPWM_DC_EVENT_1, EPWM_DC_EVENT_SOURCE_ORIG_SIGNAL);