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.

Compiler/TMS320F280049C: blanking pulses using trip zone

Part Number: TMS320F280049C


Tool/software: TI C/C++ Compiler

Hi,

I was trying to blank the pulses using trip zone and the following are the commands I used to achieve it.

1. EPwm1Regs.TZFRC.bit.DCAEVT2 = 1; //force event on
2. EPwm1Regs.TZCLR.bit.DCAEVT2 = 1; //clears set condition
3. EPwm1Regs.TZDCSEL.bit.DCAEVT2 = 2;//DCAH = high, DCAL = don't care
4. EPwm1Regs.TZSEL.bit.DCAEVT2 = 1; //CBC mode is on
5. EPwm1Regs.TZCTL.bit.DCAEVT2 = 2; //force low on epwma 

Since I want this operation to repeat for every cycle. I've used CBC mode. But with this logic the output is not effective. Even when I change 4th line of code to a value of 1, I see the same output. I know I'm missing one more command to make it work the way I require, but I'm not able to decipher it. Is there anyway I can blank them completely without the fall as the picture shows? Please let me know.

Thank you in advance

Regards

  • Reshma,

    Due to the US holiday we will get back to you no later than July 8th end of day US Central time.

    Best regards,

    Matthew

  • Hi,

    Since you are enabling DCxEVTy a CBC event, you should configure TZCTL[TZA/B] for the action needed.
    As you can refer in the TRM -

    Cycle-by-Cycle (CBC):
    When a cycle-by-cycle trip event occurs, the action specified in the TZCTL[TZA] and TZCTL[TZB] bits
    is carried out immediately on the EPWMxA and/or EPWMxB outputs.

  • Hi,

    That worked! Thank you. 

    // EPwm1Regs.TZCLR.bit.DCAEVT2 = 1; //clears set condition
       EPwm1Regs.TZDCSEL.bit.DCAEVT2 = 2;//DCAH = high, DCAL = don't care
    // EPwm1Regs.TZSEL.bit.DCAEVT2 = 1; //CBC mode is on
       EPwm1Regs.TZCTL.bit.DCAEVT2 = 2; //force low on epwma ; 

       EPwm1Regs.TZCTL.bit.TZA = 2;

    But when I comment the above lines (shown in  comment lines), the blanking still works - CBC or not. That makes me wonder where I should be using them if not in here, for this periodic blanking.

    And is force syncing of pulses not required? With or without the following line, code still works

     EPwm1Regs.DCACTL.bit.EVT2FRCSYNCSEL = 1; //Source is synchronized with EPWMCLK

     Please let me know.

    Regards
    Reshma

  • Hi,

    Good to know that it works for you. Yes - Blanking works irrespective of whether you are using the DCxEVTy generated it as CBC or not.

    Reshma M1 said:
    And is force syncing of pulses not required?

    No. You don't necessarily have to choose Sync path always.

  • Hi,

    Thank you. I got it.

    Regards