From: GianPiero Puccioni <gianpiero.puccioni@isc.cnr.it>
To: Jorge Ramirez Ortiz <jro@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] Programming Xenomai+analogy
Date: Fri, 08 Jan 2016 13:37:00 +0100 [thread overview]
Message-ID: <568FAD6C.2000801@isc.cnr.it> (raw)
In-Reply-To: <567AA8DD.9000202@xenomai.org>
Sorry for the delay, but I was away for a few days ... and then got the flu...
On 23/12/15 14:59, Jorge Ramirez Ortiz wrote:
> On 12/23/2015 03:44 AM, GianPiero Puccioni wrote:
>> On 23/12/15 00:45, Jorge Ramirez Ortiz wrote:
>>
>>>
>>> have you tried reading the Xenomai demo code or the analogy utilities?
>>> http://git.xenomai.org/xenomai-3.git/tree/utils/analogy
>>>
>>
>> Yes, of course, but the analogy utils are not written for realtime
>
> what do you mean? do you see mode switches when you run them?
> I havent executed them in a while but as far as I remember some of them were.
>
>> (and there
>> are some bits missing, for example insn_read does not set the range properly),
>
> could you point me where?
>
I think it's where it calls a4l_sync_read and passes CHAN, that is only the
channel info but not the range. While the range is used when printing the
output, resulting in wrong values.
>> and the realtime examples are quite obscure for a beginner: only sparse comments
>> and no explanation on what's going on.
>>
>
> if you want a 101 example have a look at this control program
> http://git.xenomai.org/xenomai-jro.git/tree/demo/posix/cobalt/gpiopwm.c?h=410c
>
> it opens an rtdm driver that generates a PWM signal using a GPIO
> http://git.xenomai.org/xenomai-jro.git/tree/kernel/drivers/gpiopwm/gpiopwm.c?h=410c
>
> The control program spawns two threads one to set the PWM signal base
> configuration and another one to change the duty cycle (either automatically or
> via user control, optional vi command line)
>
> The driver presents a rt path to change the duty cycle and start/stop the PWM
> signal (so no mode switches, always running in primary mode) and a non-rt path
> to set the config.
> The config has to be in a non-rt path since the kernel framework to configure
> the GPIO requires some non-rt linux services.
>
> It doesnt get any simpler than that I believe.
>
>
Thanks, I'll check that.
GianPiero
--
GianPiero Puccioni |Istituto dei Sistemi Complessi-CNR
gianpiero.puccioni@isc.cnr.it |Via Madonna del Piano, 10
T:+39 0555226682 F:+39 0555226683|50019 Sesto F. (Firenze) ITALY
next prev parent reply other threads:[~2016-01-08 12:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-22 14:28 [Xenomai] Programming Xenomai+analogy GianPiero Puccioni
2015-12-22 23:45 ` Jorge Ramirez Ortiz
2015-12-23 8:44 ` GianPiero Puccioni
2015-12-23 13:59 ` Jorge Ramirez Ortiz
2016-01-08 12:37 ` GianPiero Puccioni [this message]
2015-12-23 15:45 ` Orestes Mas
2015-12-23 15:58 ` 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=568FAD6C.2000801@isc.cnr.it \
--to=gianpiero.puccioni@isc.cnr.it \
--cc=jro@xenomai.org \
--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.