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.

PWM turn off

Other Parts Discussed in Thread: CONTROLSUITE

Hello all,

I ran into a problem and couldnt find a solution so far, wondering if you can help out.

When my external interrupt signal triggers on falling edge (yellow signal), i wan the PWM to turn OFF immediately. Looks like it waits half period more and this is very intermittent, a lot of times, it instantly turns off the PWM. i have attached a picture.

__interrupt void xint2_isr(void)
{
                EALLOW;
                EPwm2Regs.AQCTLA.bit.PRD = AQ_CLEAR;                //Stop +X pwm
                EPwm2Regs.AQCTLA.bit.CAU = AQ_CLEAR;

EDIS;}

Is there any register I can use to make sure to turn it off instantly at all times? Thanks in advance