Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Timer Interrupt on Crossworks

2005-11-10 by mhaines4102

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.

Thanks,

Mike Haines

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.