By the way also beware of this problem noted in the LPC2106 errata sheet:
In summary, while software is writing to the Interrupt Register, any Match or Capture event
(which are configured to interrupt the core) occurring at the same time may result in the
subsequent interrupt not being recognized. Similarly for the Capture event, if a capture
event occurs while a Match event is being is serviced then the Capture event might be
missed if the software and hardware accesses coincide.
I'm enabling the channel interrupts for the timer only one at a time.
Rob
--- In lpc2000@yahoogroups.com, dasbento@a... wrote:
>
> Thanks Rob!!!
>
> The problem was to clean the interruption flags, as you said. The
> part of reading the iopin, I can do because I have connected PWM to
> the capture pin and a GPIO...
>
> Domingos
>
>
>
>
> Citando chazeltopman <rob@n...>:
>
> >
> >
> > --- In lpc2000@yahoogroups.com, dasbento@a... wrote:
> > > T1IR |= TIR_CR0I;
> > > T1IR |= TIR_CR1I;
> > > T1IR |= TIR_CR2I;
> > These three lines will turn off all the interrupts if more than one
> happens
> > at the same time
> > since it is oring a value onto itself and then writing it back. If
> others
> > are set they will be
> > written back too. You need to change the |= to just =.
> >
> > > if(IOPIN0 & ACEL_asc_x){ //verify rising edge
> > You cannot read the iopin level while the iopin is assigned to the
> timer.
> > You must switch it
> > to GPIO with PINSEL0 first, read it, then switch back.
> >
> > Rob
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
>
> _________________________________________________________
> CEAC Cursos de formação profissional - peça informações aqui.:
> http://ceac.online.pt/Message
Re: accurate pulse measurements
2005-01-26 by chazeltopman
Attachments
- No local attachments were found for this message.