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.

LAUNCHXL-F28377S: Using Digital-Compare and Trip-Zone Modules together

Part Number: LAUNCHXL-F28377S

I want to use an input signal on a single pin to force a PWM output low. This can be done
by the Trip-Zone Module and should happen on a cycle-by-cycle basis (CBC).
Furthermore, the input signal must be blanked by the DC-Module for a short time after the
start of a PWM period.

I might have the wrong understanding of how to configure and connect the modules of
the microcontroller to achieve this.
As the PWM coming from the Action Qualifier Module ist already set up and tested successfully
when operating "standalone" I only want to discuss how to set up the Trip/DC functionality.

Here is how I picture the signal paths:

  1. The PWM passes Deadband- and Chopper-Modules unimpacted to reach the TZ-Unit.
    As long as no trip occurs the signal is sent out as-is on the ePWMxA line.
  2. The Pin reads the input signal, which is sent through the X-Bar towards the
    DC-Module, likewise without changes.
  3. The DC-Module blocks the signal according to the blanking time. If that is
    over, the input signal may generate a DC event to force ePWMxA to LOW.
  4. The trip takes effect, ePWMxA is set to LOW until the next period (CBC
    operation)



The following is my current code:


EALLOW;
InputXbarRegs.INPUT1SELECT = 21; /*GPIO for Input1 = TZ1*/
GpioCtrlRegs.GPAQSEL2.bit.GPIO21 = 3; /*Asynchronous input*/

EPwm2Regs.DCTRIPSEL.bit.DCAHCOMPSEL= 0; /*TZ1 is DCAH Input*/
EPwm2Regs.TZDCSEL.bit.DCAEVT2 = 2;    /*DCAEVT2: DCAH = high, DCAL = don't care*/
EPwm2Regs.TZSEL.bit.DCAEVT2 = 1; /*DCAEVT2 is CBC trip source*/
EPwm2Regs.TZCTL.bit.DCAEVT2 = 2; /*DCAEVT2 forces EPWMxA low*/

EPwm2Regs.DCFCTL.bit.SRCSEL = 1; /*DCAEVT2 is filter source*/
EPwm2Regs.DCACTL.bit.EVT2SRCSEL = 1; /*Source for outgoing DCAEVT2 is DCEVTFILT*/
EPwm2Regs.DCFCTL.bit.BLANKE = 1; /*enable Blanking Window*/
EPwm2Regs.DCFCTL.bit.PULSESEL = 1; /*Blanking Window alignes to TBCTR=0*/
EPwm2Regs.DCFWINDOW = 500; /*Window Length in CLK cycles*/
EDIS;

The code results in no reaction at the PWM output to the input signal.
Please help me in finding the error.


Thanks in advance for any suggestions.

EDIT 2017-09-11: Below is a more detailed picture with signal path (red) and code snippets (blue). If it seems to small then click on it.
The optional filtering is not used, but code is provided anyway. Step 3 differs slightly from the above code.