All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Hannes Mayer <h.mayer@domain.hid>
Cc: Jan Kiszka <jan.kiszka@domain.hid>, xenomai@xenomai.org
Subject: Re: [Xenomai-core] 2.4.32 compilation error + old timer example	problem
Date: Thu, 29 Dec 2005 12:17:45 +0100	[thread overview]
Message-ID: <43B3C5D9.50802@domain.hid> (raw)
In-Reply-To: <43B31E6C.9040906@domain.hid>

Hannes Mayer wrote:
> Jan Kiszka wrote:
> [...]
> 
>> Yea, maybe that periodic timer mode is not compiled in and
>> rt_timer_start fails in your original example. I think it's off by
>> default now.
> 
> 
> Yeah, got it! Sorry for not supplying error code earlier!
> 
> In Xeno source:
> int xnpod_start_timer (u_long nstick, xnisr_t tickhandler)
> [...]
> #ifndef CONFIG_XENO_HW_PERIODIC_TIMER
>     if (nstick != XN_APERIODIC_TICK)
>         return -ENODEV; /* No periodic support */
> #endif /* CONFIG_XENO_HW_PERIODIC_TIMER */
> 
> ..and guess what: I got -ENODEV back on rt_timer_start!
> 
> In .config I have
> # CONFIG_XENO_HW_PERIODIC_TIMER is not set
> 
> So the puzzle is solved!
> 
> Just one question: what's the reason why the periodic mode
> is disabled by default ?
>

Because AFAICT, most people would rather use the aperiodic timing mode 
in usual configurations for a much better accuracy. Since the periodic 
mode uses the available hw PIT and programs it once (or even some 
decrementer but without handling the time drift when reprogramming it 
after each shot), it suffers from cumulated rounding errors of the 
period. If you look at the jitter results of a trivial periodic loop 
over a broad timescale, you will see the wakeup time irremediably drift, 
whilst the average interval between shots remains stable and reasonably 
accurate. The periodic timer should be used for configurations that only 
need to enforce delays or timeouts, and not, well, precise timings.

> Thanks & best regards,
> Hannes.
> 


-- 

Philippe.


  reply	other threads:[~2005-12-29 11:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-28  2:17 [Xenomai-core] 2.4.32 compilation error + old timer example problem Hannes Mayer
2005-12-28 11:38 ` Jan Kiszka
2005-12-28 21:29   ` Hannes Mayer
2005-12-28 22:12     ` Philippe Gerum
2005-12-28 22:18       ` Jan Kiszka
2005-12-28 23:23         ` Hannes Mayer
2005-12-29 11:17           ` Philippe Gerum [this message]
2005-12-29 18:22             ` Hannes Mayer
2005-12-28 22:20       ` Philippe Gerum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43B3C5D9.50802@domain.hid \
    --to=rpm@xenomai.org \
    --cc=h.mayer@domain.hid \
    --cc=jan.kiszka@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.