[En-Nut-Discussion] Native Timer

Harald Kipp harald.kipp at egnite.de
Wed Apr 8 17:53:41 CEST 2009


Benoit Smeysters wrote:

> " Even after the timer elapsed, the callback function is not executed before the currently running thread is ready to give up the CPU. Thus, system timers may not fulfill the required accuracy. For precise or high resolution timing, native timer interrupt routines are a better choice. "
> 
> Thus, my question is what is "Native timer" ?
> 
> Is it the hardware timer ?
> 
> Can I use hardware timers (except timer 0 ?) like I want ? 

Yes, exactly. Some additional informations for the AT91 can be found at
http://www.ethernut.de/en/documents/at91-timer-irq.html
For the AVR you may check
http://www.nongnu.org/avr-libc/user-manual/
on how to write interrupt routines.

However, one timer is used by the kernel, typically TIMER0, except for
AT90CAN and mega256, where TIMER2 is used instead.

Harald








More information about the En-Nut-Discussion mailing list