AnsweredAssumed Answered

AD7606 - failed to start conversion

Question asked by DaviidR on Sep 1, 2015
Latest reply on Sep 28, 2015 by DaviidR

Hi,

 

I have  recently posted a question regarding device tree support for AD7606 (https://ez.analog.com/message/216459#216459)

Good news is that I have implemented a patch to handle device tree for AD7606 linux driver.

Bad news is I am not able to start any conversion.

 

Once Linux is started, I can see the following entries for the AD7606:

# ll /sys/bus/iio/devices/iio\:device0/

total 0

drwxr-xr-x 6 root root    0 Feb 16 21:35 ./

drwxr-xr-x 4 root root    0 Jan  1  1970 ../

drwxr-xr-x 2 root root    0 Feb 16 21:35 buffer/

-r--r--r-- 1 root root 4096 Feb 16 21:35 dev

-rw-r--r-- 1 root root 4096 Feb 16 20:55 in_voltage0_raw

-rw-r--r-- 1 root root 4096 Feb 16 21:35 in_voltage1_raw

-rw-r--r-- 1 root root 4096 Feb 16 21:35 in_voltage2_raw

-rw-r--r-- 1 root root 4096 Feb 16 21:35 in_voltage3_raw

-rw-r--r-- 1 root root 4096 Feb 16 21:35 in_voltage4_raw

-rw-r--r-- 1 root root 4096 Feb 16 21:35 in_voltage5_raw

-rw-r--r-- 1 root root 4096 Feb 16 21:35 in_voltage6_raw

-rw-r--r-- 1 root root 4096 Feb 16 21:35 in_voltage7_raw

-rw-r--r-- 1 root root 4096 Feb 16 20:57 in_voltage_scale

-r--r--r-- 1 root root 4096 Feb 16 21:35 name

-rw-r--r-- 1 root root 4096 Feb 16 21:35 oversampling_ratio

-r--r--r-- 1 root root 4096 Feb 16 21:35 oversampling_ratio_available

drwxr-xr-x 2 root root    0 Feb 16 21:35 power/

drwxr-xr-x 2 root root    0 Feb 16 21:35 scan_elements/

lrwxrwxrwx 1 root root    0 Feb 16 21:35 subsystem -> ../../../../../../../../../../bus/iio/

drwxr-xr-x 2 root root    0 Feb 16 21:35 trigger/

-rw-r--r-- 1 root root 4096 Jan  1  1970 uevent

 

To start a conversion, I do:

# cat /sys/bus/iio/devices/iio\:device0/in_voltage0_raw


This commands hangs until I ctr-Z.


I have also measured on a scope the signals CONVST and BUSY.

CONVST is low by default, when I start the cat command it goes high, it returns to low after the ctrl-Z

BUSY remains always low, showing no conversion is in progress.


I am currently focusing on the CONVST signal.

Indeed when reading the AD7606 datasheet, it appears this signal should be high by default, and a short low pulse should start the conversion.

I am wondering why my CONVST signal is low by default: shouldn't it be high?

The behavior of  CONVST after starting the cat is also strange: instead of a pulse, I do see a long high state.

My conclusion is that CONVST is recognized by the driver but not driven correctly to perform a conversion.


What can I do to have a proper control of CONVST signal ?


Regards,

David

Outcomes