OR to put it simply,
how would one write an interrupt based application to show time on
Hyperterm using LPC controller.
Both the UART and RTC are interrupt driven.
>> So how to declare the ISR's if they both are meant to be IRQ category interrupts.
Thanks,
Please let me know if the query in not well explained!!!
Vineet.
rtstofer <rstofer@...> wrote: --- In lpc2000@yahoogroups.com, vineet jain <vineetrvce@...> wrote:
>
> I meant the toolchains these two IDE's use. Ideally the way IRQ
interrupts are called should be the same as both use GCC.
>
> Also how do you plan to write IRQ routine for let's say:
>
> an RTC and a UART.
>
> beacuse in the sample code they talk about an IRQ stub ( mentioned
in earlier mail ).
>
> If anyone's using GCC, please send an sample code for activating two
IRQ interrupts.
>
> Thanks and regards,
> Vineet.
In my initialization code (substantially snipped):
// set up I2C
VICVectCntl1 = 0x00000029; // select a priority spot for a given
interrupt
VICVectAddr1 = (unsigned long) I2CISR; // pass the address of the ISR
VICIntEnable = 0x00000200; // enable interrupt
// set up Timer 0
VICVectCntl3 = 0x00000024; // set priority 3 for Timer 0
VICVectAddr3 = (unsigned long) T0ISR; // pass the address of the ISR
VICIntEnable = 0x00000010; // enable interrupt
.....
In my 'interrupt.h' where I deal with the timer interrupt prototype
void T0ISR (void) __attribute__ ((interrupt ));
void IRQ_Routine (void) __attribute__ ((interrupt("IRQ")));
void FIQ_Routine (void) __attribute__ ((interrupt("FIQ")));
void SWI_Routine (void) __attribute__ ((interrupt("SWI")));
void UNDEF_Routine (void) __attribute__ ((interrupt("UNDEF")));
In my 'interrupt.c' where the timer interrupt does nothing:
void T0ISR(void)
{
TIMER0_IR = 0x01;
VICVectAddr = 0xFF;
}
void IRQ_Routine (void) {
while (1) ;
}
void FIQ_Routine (void) {
while (1) ;
}
void SWI_Routine (void) {
while (1) ;
}
void UNDEF_Routine (void) {
while (1) ;
}
In my i2c.h file where I provide the prototype for I2CISR:
void I2CISR (void) __attribute__ ((interrupt));
And, finally, there is code in i2c.c that implements the I2C state
machine in the I2CISR interrupt handler. Not posted here
Richard
SPONSORED LINKS
Microcontrollers Microprocessor Intel microprocessors
---------------------------------
YAHOO! GROUPS LINKS
Visit your group "lpc2000" on the web.
To unsubscribe from this group, send an email to:
lpc2000-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
---------------------------------
Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2ยข/min with Yahoo! Messenger with Voice.
[Non-text portions of this message have been removed]Message
Re: [lpc2000] Re: Multiple IRQ routines in GCC (simply)
2006-05-01 by vineet jain
Attachments
- No local attachments were found for this message.