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: ePWM interrupts on TBCTR = CMPA and also on TBCTR = CMPB

Part Number: TMS320F28379D

Hi der people,

by my application I need to generate two interrupts per ePWM-Period. The one on TBCTR = CMPA, the other on TBCTR = CMPB.

Now, if I understood correctly, when I set

EPwm2Regs.ETSEL.bit.INTSELCMP = 0;    //  Enable event time-base counter equal to CMPA  or to CMPB when the timer is incrementing to INTSEL selection mux.

EPwm1Regs.ETSEL.bit.INTSEL = 100;       //  100: Enable event time-base counter equal to CMPA or CMPC when the timer is incrementing

I would get an interrupt on CMPA

This means, if I also want an interrupt on CMPB I need to change the register inside the interrupt routine to this :

EPwm1Regs.ETSEL.bit.INTSEL = 110;     //  110: Enable event: time-base counter equal to CMPB or CMPD when the timer is incrementing

And set it back by the next inerrupt to

EPwm1Regs.ETSEL.bit.INTSEL = 100; 

Is there another way I am overlooking?

Thanks and best regards!

Gustavo