I wanted to trigger an interrupt each time the PWM is reloaded.
Therefore, I added the interrupt routine
void TIMER() {
ie++;
asm("dsb");
}
and the following lines at the end of setup:
attachInterruptVector(IRQ_FLEXPWM2_0, TIMER);
NVIC_ENABLE_IRQ(IRQ_FLEXPWM2_0);
FLEXPWM2_SM0INTEN |= FLEXPWM_SMINTEN_RIE ; // Reload Interrupt Enable
The program stops at this point (no further output on serial, PWM still running).
Any idea what is wrong or missing?
Best regards
Therefore, I added the interrupt routine
void TIMER() {
ie++;
asm("dsb");
}
and the following lines at the end of setup:
attachInterruptVector(IRQ_FLEXPWM2_0, TIMER);
NVIC_ENABLE_IRQ(IRQ_FLEXPWM2_0);
FLEXPWM2_SM0INTEN |= FLEXPWM_SMINTEN_RIE ; // Reload Interrupt Enable
The program stops at this point (no further output on serial, PWM still running).
Any idea what is wrong or missing?
Best regards