All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Schaal <sschaal@domain.hid>
To: Alexis Berlemont <alexis.berlemont@domain.hid>
Cc: Peter Pastor Sampedro <pastorsa@domain.hid>, xenomai@xenomai.org
Subject: Re: [Xenomai-core] analogy - experimental branch
Date: Mon, 12 Jul 2010 22:51:42 -0700	[thread overview]
Message-ID: <F730DBD8-DEB8-4C64-BA65-19657D6EFA95@domain.hid> (raw)
In-Reply-To: <20100712222926.GA2463@domain.hid>

Hi Alexis,

  thanks a lot for the explanations. One item I am confused about is that you write that TRIG_TIMER is not suitable for DIO, but in cmd_write.c in your sample code, it is used for the analog write without problems. Wouldn't one be able to just use the same clock source for DIO as in analogue I/O?

Best wishes,

-Stefan



On Jul 12, 2010, at 15:29, Alexis Berlemont wrote:

> Hi,
> 
> Stefan Schaal wrote:
>> Hi Alexis,
>> 
>>  I guess I slowly understand that my clocking signal connected to
>>  scan_begin_arg has to come from an external DIO input, if
>>  scan_bigin_src = TRIG_EXT, and that the insn instruction is still
>>  needed to trigger the entire acquisition. 
> 
> Yes. The trigger instruction is needed so as to start the whole
> acquisition (which is composed of many scans). A periodic external
> signal is needed so as to trigger each scan.
> 
>> 
>>  Alternatively, would it be possible to use the internal clocking signals like 
>> 
>> scan_bigin_src = TRIG_FOLLOW
>> 
>> or 
>> 
>> scan_bigin_src = TRIG_TIMER
> 
> I think you are right. If the sampling clock comes from another
> subdevice, TRIG_EXT may not be the most appropriate constant. However,
> the original comedi driver only expects TRIG_EXT even if... the
> sampling signal is not external.
> 
> TRIG_TIMER does not seem suitable because it assumes an independant
> sampling clock is available.  
> 
> And TRIG_FOLLOW may be the most appropriate one. We should modify the
> driver so that TRIG_FOLLOW is used if the analog sampling clock is
> chosen.
> 
>> 
>> 
>> if I try any of these sources, I get an error -22, and dmesg reports:
>> 
>> [195882.321300] Analogy: a4l_check_cmddesc: scan_begin_src, trigger unsupported
>> 
> 
> For me, the command interface is an empty shell because the various
> parameters (start_src, scan_begin_src, ...) and the values (TRIG_*)
> are imposed. And, on the other side, the driver is fully in charge of
> the command structure as it is. So, the comedi command imposes a
> communication method but does not ease the driver's task of managing
> it (errors checking, translation, etc.)
> 
> And, in our case: DIO, we may conclude that this imposed API does not
> fit well: in scan_begin_arg, we have to pass an index which is
> supposed to correspond to some sampling clock (which is specific to a
> board). Then, we use a generic interface with board-specific
> arguments.
> 
> So, to sum up, I understand your point: the way we control the driver
> may not always be the most appropriate one. But, we inherited from
> comedi both the interface and the drivers. 
> 
> On my side, I am working on trying to implement (as a background task)
> a generic interface a little bit more based on discovery (query /
> enum) that would render the command interface obsolete. Unfortunately,
> I have nothing interesting to show yet.
> 
>> Best wishes,
>> 
>> -STefan
>> 
>> 
> 



  reply	other threads:[~2010-07-13  5:51 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-03  0:24 [Xenomai-core] analogy - experimental branch Stefan Schaal
2010-06-05 21:11 ` Alexis Berlemont
2010-06-24 22:43   ` Alexis Berlemont
2010-06-25 18:28     ` Stefan Schaal
2010-06-27 10:37       ` Alexis Berlemont
2010-06-27 15:53         ` Stefan Schaal
2010-06-30 13:45           ` Alexis Berlemont
2010-06-30 18:11             ` Stefan Schaal
2010-07-05 21:40               ` Alexis Berlemont
2010-07-05 22:02                 ` Alexis Berlemont
2010-07-07  3:57                   ` Stefan Schaal
2010-07-09 22:17                     ` Alexis Berlemont
2010-07-10  0:10                       ` Stefan Schaal
2010-07-12  6:12                         ` Stefan Schaal
2010-07-12 22:29                           ` Alexis Berlemont
2010-07-13  5:51                             ` Stefan Schaal [this message]
2010-07-13 18:40                               ` Stefan Schaal
2010-07-14 21:03                                 ` Alexis Berlemont
2010-07-15  0:46                                   ` Stefan Schaal
2010-07-15 20:59                                     ` Stefan Schaal
2010-07-19 22:01                                       ` Alexis Berlemont
2010-07-19 22:30                                         ` Stefan Schaal
2010-08-23 23:09                                           ` Alexis Berlemont
2010-08-24  6:49                                             ` Stefan Schaal
2010-09-02 21:18                                               ` Stefan Schaal
2010-09-04 21:45                                                 ` Alexis Berlemont
2010-09-08 14:30                                                   ` Stefan Schaal
2010-09-09  6:51                                                     ` Alexis Berlemont
2010-09-09 17:14                                                       ` Stefan Schaal
2010-07-14 20:42                               ` Alexis Berlemont

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=F730DBD8-DEB8-4C64-BA65-19657D6EFA95@domain.hid \
    --to=sschaal@domain.hid \
    --cc=alexis.berlemont@domain.hid \
    --cc=pastorsa@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.