Hi All,
I have modified the file arch/arm/boot/dts/am335x-bone-common.dtsi to enable the ADC and got the ADC to work in terms of reading the analog value using:
cat /sys/bus/iio/devices/iio\:device0/in_voltage0_raw
Output:
368 (V ain = 0.161V) which is my input reading.
But I am unable to run the generic-buffer.c example on Beaglebone Black
Command:
root@am335x-evm:~# ./generic_buffer -n TI-am335x-adc -l 256 -c 3
Output:
iio device number being used is 0
Problem reading scan element information
diag /sys/bus/iio/devices/iio:device0
The dir structure of my sysfs for ADC is as follows:
ls -al /sys/bus/iio/devices/iio\:device0/
o/p:
drwxr-xr-x 3 root root 0 Jan 1 2000 .
drwxr-xr-x 4 root root 0 Jan 1 2000 ..
-r--r--r-- 1 root root 4096 Apr 1 12:03 dev
-rw-r--r-- 1 root root 4096 Apr 1 12:24 in_voltage0_raw
-rw-r--r-- 1 root root 4096 Apr 1 12:03 in_voltage1_raw
-rw-r--r-- 1 root root 4096 Apr 1 12:03 in_voltage2_raw
-rw-r--r-- 1 root root 4096 Apr 1 12:03 in_voltage3_raw
-rw-r--r-- 1 root root 4096 Apr 1 12:03 in_voltage4_raw
-rw-r--r-- 1 root root 4096 Apr 1 12:03 in_voltage5_raw
-rw-r--r-- 1 root root 4096 Apr 1 12:03 in_voltage6_raw
-rw-r--r-- 1 root root 4096 Apr 1 12:03 in_voltage7_raw
-r--r--r-- 1 root root 4096 Apr 1 11:59 name
drwxr-xr-x 2 root root 0 Apr 1 12:03 power
lrwxrwxrwx 1 root root 0 Jan 1 2000 subsystem -> ../../../../../bus/iio
-rw-r--r-- 1 root root 4096 Jan 1 2000 uevent
Note: I am using the latest TI SDK version 7
Has anyone able to make it work ?