Hi,

2011/9/29 Fernando Herrero Carrón <elfe...@gmail.com>:
> El 28 de septiembre de 2011 12:19, Fernando Herrero Carrón
> <elfe...@gmail.com> escribió:
>>
>> 2011/9/28 Julien Delange <julien.dela...@gmail.com>
>>>
>>> 2011/9/27 Fernando Herrero Carrón <elfe...@gmail.com>:
>>> > [snip]
>>>
>>> Dear Fernando,
>>>
>>> Would it be possible to provide more information about your bug, in
>>> particular, the configuration of the board (which is analogy0, ...)
>>> and the code you are trying to use ?
>>>
>>> Also, as Gilles said, please also try the latest rc release, it might
>>> solve your issues.
>>>
>>> Thanks,
>>
>> Dear Gilles and Julien,
>>
>> Thanks for your replies. I will try the latest RC and let you know.
>>
>> These are the details of my setup:
>>
>> - Dmesg output:
>>
>>  Analogy: MITE: Available NI device IDs: 0x1870 0x70c0
>>
>> - lspci:
>> 01:05.0 Class ff00: National Instruments Device 70c0 (this should be the
>> NI 6143) <- used for AO
>> 01:06.0 Class ff00: National Instruments PCI-6713 <- used for AI
>>
>> - analogy-config:
>> /usr/xenomai/sbin/analogy_config  analogy0 analogy_ni_pcimio 1,5
>> /usr/xenomai/sbin/analogy_config  analogy1 analogy_ni_pcimio 1,6
>>
>> - cat /proc/analogy/devices
>> --  Analogy devices --
>>
>> | idx | status | driver
>> |  00 | Linked | analogy_ni_pcimio
>> |  01 | Linked | analogy_ni_pcimio
>> |  02 | Unused | No driver
>> [...]
>>
>> - cat /proc/analogy/00-analogy_ni_pcimio
>> --  Subdevices --
>>
>> | idx | type
>> |  00 | Analog input subdevice
>> |  01 | Unused subdevice
>> |  02 | Digital input/output subdevice
>> |  03 | Unused subdevice
>> |  04 | Unused subdevice
>> |  05 | Calibration subdevice
>> |  06 | Memory subdevice
>> |  07 | Digital input/output subdevice
>> |  08 | Unused subdevice
>> |  09 | Serial subdevice
>> |  10 | Unused subdevice
>> |  11 | Counter subdevice
>> |  12 | Counter subdevice
>> |  13 | Counter subdevice
>>
>> - cat /proc/analogy/01-analogy_ni_pcimio
>> --  Subdevices --
>>
>> | idx | type
>> |  00 | Unused subdevice
>> |  01 | Analog output subdevice
>> |  02 | Digital input/output subdevice
>> |  03 | Unused subdevice
>> |  04 | Unused subdevice
>> |  05 | Calibration subdevice
>> |  06 | Memory subdevice
>> |  07 | Digital input/output subdevice
>> |  08 | Unused subdevice
>> |  09 | Serial subdevice
>> |  10 | Unused subdevice
>> |  11 | Counter subdevice
>> |  12 | Counter subdevice
>> |  13 | Counter subdevice
>>
>> Thanks,
>> Fernando
>
> Dear all,
>
> I have followed your advice and just tested with the following
> kernel/xenomai versions:
>
> Linux ******** 2.6.38.8-xenomai-2.6rc4 #1 SMP PREEMPT Thu Sep 29 16:17:41
> BRT 2011 x86_64 GNU/Linux
>
> Now both "cmd_read" and my own code are running, but "a4l_async_read" reads
> either garbage or either value of 0 or 0x8000. In order to make cmd_read
> work with my board I had to make the following changes to the code:
>
> --- cmd_read.c.orig    2011-09-29 16:40:50.000000000 -0300
> +++ cmd_read.c    2011-09-29 16:41:04.000000000 -0300
> @@ -66,8 +66,8 @@
>      .start_arg = 0,
>      .scan_begin_src = TRIG_TIMER,
>      .scan_begin_arg = 8000000,    /* in ns */
> -    .convert_src = TRIG_TIMER,
> -    .convert_arg = 500000,    /* in ns */
> +    .convert_src = TRIG_NOW,
> +    .convert_arg = 00000,    /* in ns */
>      .scan_end_src = TRIG_COUNT,
>      .scan_end_arg = 0,
>      .stop_src = TRIG_COUNT,
>
> otherwise the drive would complain about "the driver cmd_test failed" or
> something like that, because my board has 8 parallel ADCs.
>
> If I run my program (see attachment) and call dmesg I can see:
>
> [  641.237710] Analogy: analogy_ni_pcimio: ni_ai_cmd: start
> [  641.237718] Analogy: analogy_ni_pcimio: ni_ai_cmd:
> Interrupt_A_Enable_Register = 0x0031
> [  641.237723] Analogy: analogy_ni_pcimio: ni_ai_cmd: exit
> [  641.238874] Analogy: analogy_ni_pcimio: ni_mio_common: interrupt:
> a_status=90b0 ai_mite_status=00200000
> [  641.239872] Analogy: analogy_ni_pcimio: ni_mio_common: interrupt:
> a_status=9030 ai_mite_status=00200000
> [...]
> [  642.237879] Analogy: analogy_ni_pcimio: ni_mio_common: interrupt:
> a_status=9070 ai_mite_status=00200000
> [  642.237881] Analogy: analogy_ni_pcimio: ni_mio_common: SC_TC interrupt
>
> I just checked my setup with our RTAI/comedi code and it is properly
> working. The input card is attached to a 3Hz sine wave generator with 1V
> peek-to-peek. If I run the attached program, the output looks like this:
>
> Analogy device analogy_ni_pcimio.
> Channel 0 has 16 bits and 1 different ranges
> 32768
> 32768
> 32768
> 32768
> 32768
> [...]
> 32768
>
> Any help on debugging this would be greatly appreciated.

With insn_read, did you manage to acquire correct values at least?

>
> Sincerely,
> Fernando
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@gna.org
> https://mail.gna.org/listinfo/xenomai-help
>
>

Alexis.

_______________________________________________
Xenomai-help mailing list
Xenomai-help@gna.org
https://mail.gna.org/listinfo/xenomai-help

Reply via email to