Discussion:
timer vs task with taskdelay ( or nanosleep)
(too old to reply)
mbm
2005-08-30 12:16:41 UTC
Permalink
Hi

I am wondering about the best solution between using a
1) timer to execute a task at periodic interval
2) a task that sleep for a period of time : nanosleep ( or taskdelay)
then do some processing

Does any cooment about theses solutions
macabbi
2005-08-30 14:01:28 UTC
Permalink
The principal difference would be the precision and determinism of the
time intervals your task is waking up.

The first approach is more deterministic one, whereas the other one
allows for the time interval to drift, imprecise.

my $.05

vxworks
ssubbarayan
2005-08-31 04:38:53 UTC
Permalink
Post by macabbi
The principal difference would be the precision and determinism of the
time intervals your task is waking up.
The first approach is more deterministic one, whereas the other one
allows for the time interval to drift, imprecise.
my $.05
vxworks
Macabbi,
Can you please explain how you arrived at this conclusion?I am
interested in understanding the reason from you.Because we use lots of
timers in our application.

Regards,
s.subbarayan
vali
2005-09-03 10:01:10 UTC
Permalink
when u use timers (watchDogs), it will invoke the function in interrupt
context. I think that's y Macabbi stated it as more deterministic
one....

let me know if this is wrong... :-(

Regards.
Vali.
ssubbarayan
2005-09-06 12:54:12 UTC
Permalink
Post by vali
when u use timers (watchDogs), it will invoke the function in interrupt
context. I think that's y Macabbi stated it as more deterministic
one....
let me know if this is wrong... :-(
Regards.
Vali.
IMHO and FYKI ,not all timers are watchdog timers....
macabbi
2005-09-07 14:48:21 UTC
Permalink
Timers are driven by a hardware clock, which is precise.
When taskdelay is used it is not tied directrly to a hardware clock.
The taskdelay resolution is in VxWorks ticks which is in most cases
rough.
Post by ssubbarayan
Macabbi,
Can you please explain how you arrived at this conclusion?I am
interested in understanding the reason from you.Because we use lots of
timers in our application.
Regards,
s.subbarayan
Loading...