Hello,
I'm testing an ISR which is triggered by a Trip Zone.
In my code I enable the peripheral clock by setting the PCLKCR1[EPWM2ENCLK] bit, then I force the interrupt, then I clear it like so:
EALLOW;
EPwm2Regs.TZFRC.bit.DCBEVT1 = 1;
EPwm2Regs.TZCLR.bit.DCBEVT1 = 1;
EPwm2Regs.TZCLR.bit.INT = 1;
EDIS;
The write to TZFRC works fine, but the writes to TZCLR won't work unless I add a line before the above snippet to start the time-base clock by setting the PCLKCR0[TBCLKSYNC] bit.
So here is my question: is this the expected behaviour?
Best Regards,
PB