Hello,
I'm trying to get some values from ADC input 4 and 5 from a CM-T335 board with a linux-3.2.0 kernel.
To test that, the generic_buffer.c from kernel source is used (without trigger as recommanded)
First a script configure the io:
mount -t debugfs nodev /sys/kernel/debug
echo continuous > /sys/bus/iio/devices/iio\:device0/mode
echo 1 > /sys/bus/iio/devices/iio\:device0/scan_elements/in_voltage4_en
echo 1 > /sys/bus/iio/devices/iio\:device0/scan_elements/in_voltage5_en
echo 100 > /sys/bus/iio/devices/iio\:device0/buffer/length
echo 0 > /sys/bus/iio/devices/iio\:device0/buffer/enable
then the exe is launched with these parameters:
-n tiadc -l 2500 -w 5000000 -c 20
This means that a 2500 samples buffer is read every 5000000ns (5s) 20 times
Few problems are listed and can't be resolved with basic google/forums searches:
1) when acquiring some buffer in continuous mode, the values get mixed
Here is a graph of the two inputs values
2) The sample rate seems to be 800Hz, how can I change it?