This is a sample to configure the timer for interruption:
T0TCR = 2; T0TCR=0;
T0PR = (SYSCLK / 256); /* Prescaler increments 32 times per sec */
T0TCR=1;
/* Config T0 to interrupt at 8 and 24 and reset at 32 counts */
T0MCR=0x89; /* Interrupt at T0MR0 and T0MR1; Reset at T0MR2 */
T0IR=3; /* Interrupt at T0MR0 and T0MR1 */
T0MR0 = 7; /* Interrupt When T0TC==8 */
T0MR1 = 23; /* Interrupt when T0TC=$ */
T0MR2 = 31; /* Reset when T0TC=2 */
VICIntSelect |= 0x10; /* Register the interrupt on the VIC */
VICIntEnable = 0x10;
All the information that you need to make a good interruption is in the user
manual of the LPC23xx, read the TIMER0,1,2,3 chapter so you will undertand
how to setu it up.
Besides the reading you must understand how to point to the proper
interruption function at the startup file, if you got any interruption to
work already, search for the interruption funtion filename in the .s file
and you will understand.
Glad to help.
Felipe.
2009/12/14 Javeed Shariff
> Dear Felipe,
>
> Thanks.
>
> I've tried with LPC2129 and was able to simulate the interrupt. Do you
have
> pointers/links which explains how to generate precise interrupts (say 1s).
>
> Regards,
> Javeed
>
> ------------------------------
> *From:* Felipe de Andrade Neves L.
> *To:* l...
> *Sent:* Sun, December 13, 2009 12:24:36 AM
> *Subject:* Re: [lpc2000] LPC23xx timer 1 interrupt IRQ mode sample code
> (Keil Simulator)
>
> There are samples in the directories of the keil.
>
> To configure timer interrupt you must set up the timer, the vicvector and
> the startup file.
>
> 2009/12/12 Javeed Shariff
> >> Hi,
>>
>> I'm using keil uvision4 simulator for learning ARM7 LPC23xx
programming
>> and get familiar with peripherals.
>>
>> Could someone help me by sending sample project file to generate timer1
>> interrupt (IRQ mode).
>>
>> I tried the code bundle on the NXP site for 23xx family but was of not
>> much help.
>>
>> Awaiting for favorable response.
>> Regards,
>> Javeed
>>
>>
>