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.

TMS320F28P650DK9:TZ Digital Compare

Hi TI Team,

         

I am using the 28P65 development board to develop EPWM TZ digital comparison based on EPWM_ Ex5_ Digital_ Compare_ Event_ The filter routine found the following issues:

1. Using the default configuration, DCAH is configured to trigger at a low level. When the TZ interrupt is triggered, GPIO25 connected to XBAR1 will be forcibly pulled to a low level, even if the pin is connected to the VCC, it cannot be changed, resulting in the TZ interrupt being continuously triggered;

2. If the digital comparison event DCAH is configured to trigger at a high level, i.e. EPWM_ SetTripZoneDigitalCompareEventCondition (myEPWM_1_BASE, EPWM_TZ-DC-OUTPUT-A1, EPWM_TZ-EVENTDCXH_HIGH); After GPIO25 is connected to VCC, the GPIO25 pin can read high level, but the TZ interrupt cannot be triggered.

        Thanks & Regards

  • Hi Lin,

    I am looking into your concern. Will get back to you soon. 

    best Regards,

    Uttam Reddy Pailla

  • Hello,

    You state that GPIO25 is pulled low after the TZ interrupt is triggered. In example 5, by default, GPIO25 being pulled low is the trigger for the trip.

    What is triggering the TZ interrupt in your code?

    Regards,

    Jason Osborn

  • 1. After using the default configuration and loading the program, the program steps into the Board_ EPWM in init()_ EPWM in init()_ After the setTripZoneDigitalCompareEventCondition configures the function for the A event event, the DCAEVT1 and INT of TZFLG are set to 1, and EPWM is run_ After the setTripZoneDigitalCompareEventCondition configures the function for the B event, DCBEVT1 will also be set to 1.

    2. When the program runs continuously, regardless of whether GPIO25 is connected to a 3.3V VCC or GND, DCAEVT1, DCBEVT1, and INT are continuously set to 1 in the TZFLG register, and EPWM1A (GPIO0) outputs a 0 level PWM signal, while EPWM1B (GPIO1) outputs a frequency of 250Hz with a duty cycle of approximately 17%.

  • Hi Lin,

    Thanks for pointing this out. Yes, even I observe the same scenario and ePMW1 stays low irrespective of enable/disable trip (Via GPIO25). This looks like a code error and I have looped the experts to correct this. 

    Do you any other help. 

    Thanks & Regards,

    Uttam

  • Hi Uttam,

    Thank you for your reply. Looking forward to the expert solution.

     Thanks & Regards,

    lin

  • Hi Lin,

    I figured out the issue. 

    In this F28P65x device, the INPUT_XBAR needs to be connected to EPWM_XBAR which goes to digital compare submodule. This was missing from both example-4 and example-5 is unique from other devices.

    Please add below lines of code to the existing code. This will fix your concern. 

    //
    // EPWMXBAR Configurations
    //
    //*****************************************************************************
    void EPWMXBAR_init(){
        myEPWMXBAR0_init();
    }

    void myEPWMXBAR0_init(){
            
        XBAR_setEPWMMuxConfig(myEPWMXBAR0, XBAR_EPWM_MUX01_INPUTXBAR1_INPUT1);
        XBAR_enableEPWMMux(myEPWMXBAR0, XBAR_MUX01);
    }

    Let me know if you have any queries.

    Best Regards,

    Uttam

  • HI Uttam,

    Thank you,I have solved this issue!

    Best Regards,

    lin