This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Reset Timer_0 Interrupt

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??

Parents
  • 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.

Reply
  • 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.

Children