[En-Nut-Discussion] Timers running slow

Greg wood greg.wood at shaw.ca
Fri Apr 28 21:00:51 CEST 2006


Is the reason for the off timing of NutSleeps similiar?  It's too bad these things don't work properly as this would save some hardware.

Greg Wood

----- Original Message -----
From: Harald Kipp <harald.kipp at egnite.de>
Date: Friday, April 28, 2006 2:26 am
Subject: Re: [En-Nut-Discussion] Timers running slow

> Greg,
> 
> At 21:56 27.04.2006 -0600, you wrote:
> 
> >I'm having some trouble getting a simple timer to run on in my
> >application (a modified version of httpserv).  The timer does 
> run, but
> >much slower than it should (approx 2-3 times too slow).  My timer
> >callback function is this:
> >
> >void TimerCallback(HANDLE timer, void *arg)
> >{
> >     PORTB^=0x08;
> >}
> 
> Timer callbacks are deprecated. There had been several discussions,
> wether we should completely remove them. They are running in
> interrupt context and may spoil the real time behavior. Instead
> of removing them, we decided to execute timer callbacks during
> context switches. This provides some backward compatibility, but
> the exact timing is lost.
> 
> You should use timer interrupts in your application instead.
> Timer 0 is reserved for Nut/OS, all other timers may be freely
> used by your application.
> 
> Sorry for any outdated documentation, which may have mislead you.
> 
> Harald
> 
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
> 




More information about the En-Nut-Discussion mailing list