Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: Timer interrupts on LPC2138

2006-05-15 by rtstofer

--- In lpc2000@yahoogroups.com, "ylavoie66" <ylavoie66@...> wrote:
>
> --- In lpc2000@yahoogroups.com, "Karl Olsen" <kro@> wrote:
> >
> > 
> > You should set the match register to one less than the desired 
> period.  The
> > timer goes to 0 the next count _after_ the match, so if you set 
> the match
> > register to e.g. 4, the timer will count 0, 1, 2, 3, 4, 0, 1, 2, 
> 3, 4...
> > giving a period of 5.  Try a match value of 0.
> > 
> > Karl Olsen
> >
> 
> 
> Thanks Karl.
> 
> Is it something you already tried and tested? 
> Philips documentation does not clearly state that.  Then again it 
> won't be the first time an IC manufacturer gives incomplete 
> documentation :(
> 
> Regards,
> 
> Yves Lavoie
>

Figure 46 in the datasheet is quite specific.  The counter goes to
zero on the PCLK following the match and more specifically, at the
terminal count of the prescale counter.

Figure 47 shows more detail of the stop on match and interrupt on
match.  In this case everything happens at the end of the first step
of the prescale counter.

Richard

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.