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 via email to