All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: at91_enthus <nwromania@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] High resolution timers disabled on AT91SAM9G20 board	after patching
Date: Sat, 30 Oct 2010 00:06:43 +0200	[thread overview]
Message-ID: <4CCB4573.30607@domain.hid> (raw)
In-Reply-To: <AANLkTinQotwe=EwATsmdKnanN-ZwT8c+CobzBRDqptEj@domain.hid>

at91_enthus wrote:
> Hi!
> 
> I installed the latest xenomai patch on a AT91SAM9G20 board and
> everything looked good at a first glance: no compilation problems, low
> latencies.
> 
> However, when I typed cat /proc/timer_list , the resolutions in  cpu0
> and cpu1 items showed 100000 (ns).
> (I compiled the Xenomai patched kernel with High Resolution Timers enabled.)
> 
> I don't have this problem when I boot a real time kernel (RT_PREEMPT).

You mean another real-time kernel? If RT_PREEMPT uses the sys timer
running at 32kHz, and it tells you that it has a 1ns resolution, then it
is lying, because 32kHz, means a 30us resolution.

Xenomai uses one TC as a timer at whatever frequency your chip proposes
over 1 MHz, this means a resolution below 1us, the downside is that this
also means a very short wrap time. And since the TC is also used as a
clock, this means that we must enter the timer interrupt handler before
the counter wraps. And this is something that Linux without Xenomai
running can not guarantee.

Do you have this issue when running a Xenomai application?

Also note that if you use Xenomai timing services, you will not have
this issue, of course.

>
> One more thing. I also have a Beagleboard that runs a Xenomai patched
> kernel and in this case the resolution for HRT shows 1 ns, as it should.
>

If you read a bit more about the I-pipe patch for ARM, you will learn
that the timer implementation is specific to each SOC. So, comparing the
OMAP3530 to the AT91SAM9G20 is as much relevant as comparing the timer
of an X86 to the timer of a PowerPC.

-- 
                                                                Gilles.


  reply	other threads:[~2010-10-29 22:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-29 18:34 [Xenomai-help] High resolution timers disabled on AT91SAM9G20 board after patching at91_enthus
2010-10-29 22:06 ` Gilles Chanteperdrix [this message]
2010-11-07 10:47   ` Gilles Chanteperdrix
     [not found]   ` <4CD68353.6030600@domain.hid>
2010-11-07 16:09     ` at91_enthus
2010-11-07 17:15       ` Gilles Chanteperdrix
2010-11-07 19:45         ` at91_enthus
2010-11-07 20:24           ` Gilles Chanteperdrix
2010-11-07 20:34             ` at91_enthus

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=4CCB4573.30607@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=nwromania@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.