The TCPWM interrupt must be cleared inside isr. Add line TCPWM_ClearInterrupt(); inside ISR code, where TCPWM - is the name of your PWM component.
Thanks, I added TCPWM_1_ClearInterrupt(); in Timer_ISR.c but there are 2 issues:
1. I had to add #include "TCPWM_1.h" to get the function recognized and
2. It's complaining that it needs an argument.
I figured it out, the code/command that works in the ISR is as follows...
#endif /* Timer_ISR_INTERRUPT_INTERRUPT_CALLBACK */
/* Place your Interrupt code here. */
/* `#START Timer_ISR_Interrupt` */
LED_2_Write( ~ LED_2_Read() );
/* `#END` */
The datasheet for the TCPWM_1 component provides just 2 arguments, one for interrupt on terminal count (mine) and interrupt on compare/capture count. What's slightly confusing is that the TCPWM component generates the input to the ISR so you have to clear the ISR flag in the TCPWM, not the ISR component.
1 of 1 people found this helpful
You can refer to the TCPWMExample Project in Code example section of Creator for better understanding of the Interrupt clearing.