Tool/software:
Hello, I have set up an interrupt from ePWM that is triggered when counter equals CMPC while counting up. I want it to generate one interrupt then go silent until needed again.
I tried waiting until I needed the interrupt to reset the Latched ePWM Interrupt (EPWMx_INT) Status Flag.
However, there is a problem. Per register addendum documentation (spruj42c) table 3-532,
Up to one interrupt can be pending while the
ETFLG[INT] bit is still set. If an interrupt is pending, it will not be
generated until after the ETFLG[INT] bit is cleared.
Because of this, as soon as I clear the interrupt Status Flag, the interrupt trips the ISR again.
I tried using EPWM_disableInterrupt(CONFIG_EPWM3_BASE_ADDR);
But it doesn't work. Is there a way to clear pending interrupts so it won't trigger after I clear the Status Flag until the CMPC value is reached by the ePWM?