Hi!
I wanna reset an Timer0 Interrupt with this Code:
void isr_TIMER0_INT (void) __irq { T0IR = 1;
// do code VICVectAddr = 0; }
But the Problem is, MR0 Interrupt in T0IR won't be resettet. Thus, I'll never receive a 2nd Interrupt.
Has anyone an idea??
What are your values for T0CCR and T0MCR? There are 8 different conditions that can cause a timer0 irq, and writing a 1 will only clear one of them.
Have you tried the simulator yet? You can set a break point in the isr and watch T0IR variable and the MR/CR interrupt flags in the Timer0 peripheral window.
Please give details when describing what you have done and the results you receive.
I succeeded ...
without an TOIR rest: void isr_TIMER0_INT (void) __irq { T0IR = 1; // code VICVectAddr = 0; }
without the TOIR reset: void isr_TIMER0_INT (void) __irq { // code VICVectAddr = 0; T0IR = 1; }