Reply by artsaagluap October 19, 20092009-10-19
Hi,
Just a note to say I got round the problem by getting a simple project in which I did have the interrupts working reliably, and putting all the code from my faulty project into it. Somewhere along the line I messed up something. I can't spare the time to find out what.

--- In l..., "artsaagluap" wrote:
>
> No it's just an external interrupt to set up a timer. I have got the EINT2 on a wire which I am manually switching between 0 and 3.3V.
>
> The interrupt must be happening because global interrupts are enabled and the interrupt flag is being set, but where it goes is a puzzle.
>
> I think I will make some progress if I understand the workings of
> ctl_set_isr().
>
> I'll start another topic asking for help there.
>
> Thanks
>
> --- In l..., Felipe de A N L wrote:
> >
> > It seems to be a timer interruption.
> > Is there any other function using writing to any parameters of the timer of
> > the interruption?
> > Is the interruption routine execution fast enough compared to the time
> > interval between interruptions?
> >
> >
> >
> >
> > 2009/10/19 artsaagluap
> >
> > >
> > >
> > > Yes, if you mean the bit in EXTINT.
> > >
> > > --- In l... , Felipe de A N
> > > L wrote:
> > > >
> > > > Did you clear that flag to inform that the interruption routine has been
> > > > done ?
> > > >
> > > > 2009/10/18 artsaagluap
> > > >
> > > > >
> > > > >
> > > > > Hi,
> > > > >
> > > > > I am trying to get interrupts working using the CrossWorks way:
> > > > >
> > > > > ctl_set_isr(EINT2_CHAN,3,CTL_ISR_TRIGGER_FIXED,Initiate_Timing_ISR,0);
> > > > > ctl_unmask_isr(EINT2_CHAN);
> > > > > ctl_global_interrupts_enable();
> > > > >
> > > > > I had a simple program working reliably but when I put it into a more
> > > > > complicated program the thing interrupted once and carried on never to
> > > > > interrupt again.
> > > > >
> > > > > My main loop is just a counter. Sometimes that gets corrupted after the
> > > > > interrupt. I mean the count variable is bigger than the test in the
> > > loop.
> > > > >
> > > > > Looking at the EINT2 it is definite being set by my second interrupt.
> > > > > I am just looking for anyone who can point out usual gotchas.
> > >
> > >
> > >
> >
> >
> >
>

An Engineer's Guide to the LPC2100 Series

Reply by artsaagluap October 19, 20092009-10-19
No it's just an external interrupt to set up a timer. I have got the EINT2 on a wire which I am manually switching between 0 and 3.3V.

The interrupt must be happening because global interrupts are enabled and the interrupt flag is being set, but where it goes is a puzzle.

I think I will make some progress if I understand the workings of
ctl_set_isr().

I'll start another topic asking for help there.

Thanks

--- In l..., Felipe de A N L wrote:
>
> It seems to be a timer interruption.
> Is there any other function using writing to any parameters of the timer of
> the interruption?
> Is the interruption routine execution fast enough compared to the time
> interval between interruptions?
> 2009/10/19 artsaagluap >
> >
> > Yes, if you mean the bit in EXTINT.
> >
> > --- In l... , Felipe de A N
> > L wrote:
> > >
> > > Did you clear that flag to inform that the interruption routine has been
> > > done ?
> > >
> > > 2009/10/18 artsaagluap
> > >
> > > >
> > > >
> > > > Hi,
> > > >
> > > > I am trying to get interrupts working using the CrossWorks way:
> > > >
> > > > ctl_set_isr(EINT2_CHAN,3,CTL_ISR_TRIGGER_FIXED,Initiate_Timing_ISR,0);
> > > > ctl_unmask_isr(EINT2_CHAN);
> > > > ctl_global_interrupts_enable();
> > > >
> > > > I had a simple program working reliably but when I put it into a more
> > > > complicated program the thing interrupted once and carried on never to
> > > > interrupt again.
> > > >
> > > > My main loop is just a counter. Sometimes that gets corrupted after the
> > > > interrupt. I mean the count variable is bigger than the test in the
> > loop.
> > > >
> > > > Looking at the EINT2 it is definite being set by my second interrupt.
> > > > I am just looking for anyone who can point out usual gotchas.
> >
> >
> >
>
>

Reply by Felipe de A N L October 19, 20092009-10-19
It seems to be a timer interruption.
Is there any other function using writing to any parameters of the timer of
the interruption?
Is the interruption routine execution fast enough compared to the time
interval between interruptions?

2009/10/19 artsaagluap

> Yes, if you mean the bit in EXTINT.
>
> --- In l... , Felipe de A N
> L wrote:
> >
> > Did you clear that flag to inform that the interruption routine has been
> > done ?
> >
> > 2009/10/18 artsaagluap
> >
> > >
> > >
> > > Hi,
> > >
> > > I am trying to get interrupts working using the CrossWorks way:
> > >
> > > ctl_set_isr(EINT2_CHAN,3,CTL_ISR_TRIGGER_FIXED,Initiate_Timing_ISR,0);
> > > ctl_unmask_isr(EINT2_CHAN);
> > > ctl_global_interrupts_enable();
> > >
> > > I had a simple program working reliably but when I put it into a more
> > > complicated program the thing interrupted once and carried on never to
> > > interrupt again.
> > >
> > > My main loop is just a counter. Sometimes that gets corrupted after the
> > > interrupt. I mean the count variable is bigger than the test in the
> loop.
> > >
> > > Looking at the EINT2 it is definite being set by my second interrupt.
> > > I am just looking for anyone who can point out usual gotchas.
>
>
>


Reply by artsaagluap October 19, 20092009-10-19
Yes, if you mean the bit in EXTINT.

--- In l..., Felipe de A N L wrote:
>
> Did you clear that flag to inform that the interruption routine has been
> done ?
>
> 2009/10/18 artsaagluap >
> >
> > Hi,
> >
> > I am trying to get interrupts working using the CrossWorks way:
> >
> > ctl_set_isr(EINT2_CHAN,3,CTL_ISR_TRIGGER_FIXED,Initiate_Timing_ISR,0);
> > ctl_unmask_isr(EINT2_CHAN);
> > ctl_global_interrupts_enable();
> >
> > I had a simple program working reliably but when I put it into a more
> > complicated program the thing interrupted once and carried on never to
> > interrupt again.
> >
> > My main loop is just a counter. Sometimes that gets corrupted after the
> > interrupt. I mean the count variable is bigger than the test in the loop.
> >
> > Looking at the EINT2 it is definite being set by my second interrupt.
> > I am just looking for anyone who can point out usual gotchas.

Reply by Felipe de A N L October 19, 20092009-10-19
Did you clear that flag to inform that the interruption routine has been
done ?

2009/10/18 artsaagluap

> Hi,
>
> I am trying to get interrupts working using the CrossWorks way:
>
> ctl_set_isr(EINT2_CHAN,3,CTL_ISR_TRIGGER_FIXED,Initiate_Timing_ISR,0);
> ctl_unmask_isr(EINT2_CHAN);
> ctl_global_interrupts_enable();
>
> I had a simple program working reliably but when I put it into a more
> complicated program the thing interrupted once and carried on never to
> interrupt again.
>
> My main loop is just a counter. Sometimes that gets corrupted after the
> interrupt. I mean the count variable is bigger than the test in the loop.
>
> Looking at the EINT2 it is definite being set by my second interrupt.
> I am just looking for anyone who can point out usual gotchas.
>
>
>


Reply by artsaagluap October 18, 20092009-10-18
Hi,

I am trying to get interrupts working using the CrossWorks way:

ctl_set_isr(EINT2_CHAN,3,CTL_ISR_TRIGGER_FIXED,Initiate_Timing_ISR,0);
ctl_unmask_isr(EINT2_CHAN);
ctl_global_interrupts_enable();

I had a simple program working reliably but when I put it into a more complicated program the thing interrupted once and carried on never to interrupt again.

My main loop is just a counter. Sometimes that gets corrupted after the interrupt. I mean the count variable is bigger than the test in the loop.

Looking at the EINT2 it is definite being set by my second interrupt.
I am just looking for anyone who can point out usual gotchas.