EmbeddedRelated.com
Forums

unable to run the interrupt handler

Started by preethamreddy1989 October 4, 2012
--- In l..., Alexan_e wrote:
>
> On 5/10/2012 17:23, preethamreddy1989 wrote:
> >
> >
> >
> > --- In l... , Alexan_e wrote:
> > >
> > > On 10/05/2012 10:22 AM, roelof 't Hooft wrote:
> > > >
> > > > On Fri, 2012-10-05 at 03:35 +0000, preethamreddy1989 wrote:
> > > > > > > void RTC_isr(void)
> > > > > > > {
> > > > > > > /* write code here */
> > > > > > > if(ILR&0x01)
> > > > > > > {
> > > > > > > IOSET1=0xf0000000;
> > > > > > > }
> > > > > > > if(ILR&0x03)
> > > > > > > {
> > > > > > > IOSET1=0x0f000000;
> > > > > > > }
> > > >
> > > > How about the use of ioclr1 to turn off the LEDs ?
> > > >
> > > > roelof
> > > >
> > > >
> > >
> > > I just noticed that the interrupt function declaration is missing the
> > > __isr prefix, it should be
> > > __isr void RTC_isr(void)
> > >
> > > Also both if(ILR&0x01) and if(ILR&0x03) are true every time the
> > > interrupt fires (because IRL equals 1) so you should consider using
> > > if(ILR&0x02) to check the alarm flag
> > >
> > >
> > im getting more error if a add __isr prefix
> >
> > _
> >
> >
> >
> What do you mean by that?
> Your original code wasn't giving any errors and adding __isr compiles fine too.
> You still haven't specified your compiler , is it keil uvision or not?
>
> When you ask your help you have to provide proper info, you didn't tell us your mcu model, the compiler or the error you get.
> First it was the interrupt not executing and now you say more errors , what kind of errors?
> --
> Alex
> ---------------------
> http://alexan.edaboard.eu/ (Home of ARMwizard, a free tool for peripheral initialization of LPC2xxx/17xx/13xx/11xx/122x microcontrollers )
>
>
>
imusing keiluvision my mcu is lpc2148 if i add __isr prefix
an error =expected a ;

An Engineer's Guide to the LPC2100 Series