---- Original Message ---- From: "ylavoie66" <ylavoie66@...> To: <lpc2000@yahoogroups.com> Sent: Saturday, May 13, 2006 4:59 AM Subject: [lpc2000] Timer interrupts on LPC2138 > Has anyone ever experienced a similar problem with timers on the > LPC2138? > > I want to get a timer to generate an interrupt at every 1ms (system > tick). I configured the prescaler so the timer would count with a 1ms > period, and the match register set so the timer would generate an > interrupt every 1ms. > > This resulted in a 2ms system tick ??!! > > As a test, I changed my prescaler, so the counter would count on a 1us > period, and interrupt every 1000us, which is the same as 1mm here in > Canada :) > > I am still waiting for an answer from Philips, but it seems that > setting a match of "1" is not working properly... 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
Message
Re: [lpc2000] Timer interrupts on LPC2138
2006-05-13 by Karl Olsen
Attachments
- No local attachments were found for this message.