From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Andrey Nechypurenko <andreynech@domain.hid>
Cc: Xenomai help <xenomai@xenomai.org>,
Bob Feretich <bob.feretich@domain.hid>
Subject: Re: [Xenomai-help] PWM generation with GPIO
Date: Thu, 08 Sep 2011 11:13:31 +0200 [thread overview]
Message-ID: <4E68873B.6080204@domain.hid> (raw)
In-Reply-To: <CAOiXNkARu4YOd+K9YMqXbvQhUYEh38fVyNQi-mthMYjQe7mCYA@mail.gmail.com>
On 09/08/2011 10:21 AM, Andrey Nechypurenko wrote:
>> So I wrote
>> a RTDM driver to use the three that were pinned out, and used real time
>> limit and overflow interrupts to to wiggle a GPIO for the fourth PWM output.
>
> It seams to me that you are using different implementation approach
> then suggested by Gilles in this thread: "I was talking
> about a Xenomai driver, using the RTDM skin using for instance two
> timers, a periodic timer which handler would set the gpio to 1 and
> launch the second timer, a one shot time which handler would set the
> gpio to 0."
If I understand correctly, the difference is that Bob proposes you to
dedicate a hardware timer to the PWM, whereas I propose you to use the
software timers, which ultimately, also depend on a dmtimer. I would not
expect big differences between the two approaches, neither in terms of
jitter, nor in terms of code.
>
> Could you please say a few words about the reasons why you chose this
> particular way?
>
>> The Linux version of this driver made the 4th servomotor growl. There is no
>> growl using the RTDM version. I asked a lab technician to probe the four
>> servo PWM signals and tell me which was software GPIO generated. He could
>> not tell.
>
> timing. So there might be fundamental difference between periodic task
> launched in user-space with rt_task_start/rt_task_set_periodic and
> similar periodic task running as RTDM driver which I do not
> understand. If this assumption is true, I would really appreciate any
> pointers to the documentation which explains what are the differences
> and why RTDM driver can deliver better rt performance then Xenomai
> thread from user-space.
As suggested in the previous mail I sent you, compare the differences in
latencies with latency -t 2 between user-space task and kernel-space
timer. You will see that a timer handler has much less jitter. Switch to
user-space, and context switch time explain the difference.
--
Gilles.
next prev parent reply other threads:[~2011-09-08 9:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-08 2:03 [Xenomai-help] PWM generation with GPIO Bob Feretich
2011-09-08 8:21 ` Andrey Nechypurenko
2011-09-08 9:13 ` Gilles Chanteperdrix [this message]
[not found] ` <CAOiXNkBjaSMRt1GO51hQUrU52PjQHZB9SfJXZzmAx72sYzyfMw@domain.hid>
2011-09-08 10:06 ` Gilles Chanteperdrix
2011-09-08 10:20 ` Philippe Gerum
2011-09-09 3:33 ` Bob Feretich
2011-09-09 11:41 ` Gilles Chanteperdrix
-- strict thread matches above, loose matches on Subject: below --
2011-09-05 19:53 Andrey Nechypurenko
2011-09-05 20:02 ` Gilles Chanteperdrix
2011-09-05 20:14 ` Andrey Nechypurenko
2011-09-06 7:29 ` Gilles Chanteperdrix
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=4E68873B.6080204@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=andreynech@domain.hid \
--cc=bob.feretich@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.