From: Robert <robert-km@o2.pl>
To: "Sagar Behere" <sagar.behere@gmail.com>,
=?UTF-8?Q?xenomai@xenomai.org?=,
xenomai@xenomai.org
Subject: Re: [Xenomai] Using hardware PWM generators with Xenomai
Date: Sat, 10 Aug 2013 14:29:23 +0200 [thread overview]
Message-ID: <ca8c552.13b41e8d.52063223.12f46@o2.pl> (raw)
In-Reply-To: <52060B80.1080601@gmail.com>
I have decided to push it here, since it was private message:
Dnia 10 sierpnia 2013 11:44 Sagar Behere <sagar.behere@gmail.com> napisał(a):
> On 08/09/2013 07:28 PM, Robert wrote:
> > I wrote this driver recently, and it generates stable pwm signal. Probably you will have to adapt it to beaglebone black.
> > It is written for Pandaboard and its hardware general purpose timer.
> > There are some ioctl interfaces for user space.
> >
> > https://github.com/rkmiec/pandaboard-pwm-rtdm/tree/dc_engine
> >
> > Do NOT use master branch now.
>
> Hello Robert,
>
> Quick question about your pandaboard-pwm-rtdm.
>
> I see in pwm.c (dc_engine branch), lines 125 and 127, that you use
> gpio_set_value() to set the level of the gpio pin. This function comes
> from #include <linux/gpio.h>, which is a standard linux driver, I guess.
> So every time you call this function, you are making a linux kernel
> call.. won't that trigger a transition away from xenomai's primary
> domain? i.e., you task won't be hard realtime anymore..
>
> I haven't understood xenomai completely, so it is possible that my
> reasoning is wrong. Could you clarify?
>
> Thanks and regards,
> Sagar
>
I'm learning it too.
gpio_set_value() could be called from any context (comments in
drivers/gpio/gpiolib.c), so it shouldn't sleep.
On osciloscope this signal looks very stable. Also servo connected to this
signal is not shaking.
And why I'm toggling gpio:
On pandaboard, hardware outputs from those timers are connected to HDMI
outuput, camera, display (for backlight) etc.
None of them is available on expansion connector. That is why I'm toggling
gpios.
My program differs a little from Andrey.
I'm using hardware interrupts from timers to change value on gpio pin and
he was using rtdm_sleep*() (as far as I remember).
next prev parent reply other threads:[~2013-08-10 12:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-08 13:36 [Xenomai] Using hardware PWM generators with Xenomai Sagar Behere
2013-08-08 13:58 ` Lennart Sorensen
2013-08-08 14:26 ` Michael Haberler
2013-08-09 17:28 ` Robert
2013-08-10 9:15 ` Sagar Behere
2013-08-10 9:36 ` Andrey Nechypurenko
[not found] ` <52060B80.1080601@gmail.com>
2013-08-10 12:29 ` Robert [this message]
2013-08-10 12:42 ` Gilles Chanteperdrix
2013-08-10 12:55 ` Gilles Chanteperdrix
2013-08-10 15:14 ` Andrey Nechypurenko
2013-08-10 15:19 ` Andrey Nechypurenko
2013-08-10 15:23 ` 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=ca8c552.13b41e8d.52063223.12f46@o2.pl \
--to=robert-km@o2.pl \
--cc==?UTF-8?Q?xenomai@xenomai.org?= \
--cc=sagar.behere@gmail.com \
--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.