---- Original Message ---- From: "mhaines4102" <mhaines4102@...> To: <lpc2000@yahoogroups.com> Sent: Thursday, November 10, 2005 9:40 PM Subject: [lpc2000] Timer Interrupt on Crossworks > I have a dumb question. I am embarrassed to ask but... I am using a > timer interrupt. My setup is as follows: > /* Timer 0 interrupt is an IRQ interrupt */ > VICIntSelect &= ~(0x10); > /* Enable timer 0 interrupt */ > VICIntEnable = (0x10); > /* Use slot 0 for timer 0 interrupt */ > VICVectCntl0 = 0x24; > /* Set the address of ISR for slot 0 */ > VICVectAddr0 = (unsigned long)timer0ISR; > /* Reset timer 0 */ > T0TCR = 0; > /* Set the timer 0 prescale counter */ > T0PR = 2500; > /* Set timer 0 match register */ > T0MR0 = 1000; > /* Generate interrupt and reset counter on match */ > T0MCR = 3; > /* Start timer 0 */ > T0TCR = 0x01; > T0IR = 0xFF; > > The interrupt was being called, then it stopped. I changed some > settings and it came back, then it stopped again. I added T0IR = 0xFF; > to the end of the setup and it worked, then it stopped again. What > have I missed? I am beginning to feel like a goof. Have you remembered a VICVectAddr = 0x00; /* Clear interrupt flag in the VIC */ and a T0IR = 0x01 /* Clear the match 0 interrupt flag */ in your interrupt handler? Karl Olsen
Message
Re: [lpc2000] Timer Interrupt on Crossworks
2005-11-10 by Karl Olsen
Attachments
- No local attachments were found for this message.