Q: Setting 50ms timer
Posted: Thu Oct 23, 2008 3:33 am
Hi all, I've use the following code to set a 50ms timer. Does the following code correctly sets it?
TIMER3_CR = 0;
TIMER3_DATA = TIMER_FREQ_64(20);
TIMER3_CR = TIMER_ENABLE | TIMER_DIV_64 | TIMER_IRQ_REQ;
irqSet(IRQ_TIMER3, timer_50ms);
irqEnable(IRQ_TIMER3);
More specifically, am I using the correct divisor?
Thanks
TIMER3_CR = 0;
TIMER3_DATA = TIMER_FREQ_64(20);
TIMER3_CR = TIMER_ENABLE | TIMER_DIV_64 | TIMER_IRQ_REQ;
irqSet(IRQ_TIMER3, timer_50ms);
irqEnable(IRQ_TIMER3);
More specifically, am I using the correct divisor?
Thanks