Strange readings ADC AIN0/2/3

I’ve voltage dividers on the input of the AIN* with 68K-33K allow me the read 0-5v. When i measure the voltage on the inputs with a DVM of AIN0, AIN2 and AIN3 and all other ports the voltage will read forexample 1000mV, As soon I activate the AIN* ports with echo cape-bone-iio > /sys/devices/bone_capemgr./slots the voltages on AIN0 will change to about 1.23V and allmost zero on AIN 2 and 3 measuring with the DVM.
Reading the voltages with cat /sys/devices/ocp.2/helper.14/AIN
(connecting same voltage 1000mV to all inputs) :

cat /sys/devices/ocp.2/helper.14/AIN*

AIN0/2/3 give me strange readings, all other ports are doing fine.

Do i doing something wrong?, are ports AIN0/2/3 used for something else?

Thanks for the help


root@bb02:~# uname -a
Linux 3.8.13-bone20 #1 SMP Wed May 29 03:11:01 UTC 2013 armv7l GNU/Linux
root@bb02:~# cat /etc/os-release
PRETTY_NAME=“Debian GNU/Linux 7.0 (wheezy)”
NAME=“Debian GNU/Linux”
VERSION=“7.0 (wheezy)”

Put a scope on the pin and you'll have more fun!
It looks like the driver is still using some of the lower inputs for touch screen scanning, even though you've allocated them all as adc inputs.
I think the upper 4 inputs are safe.

-- Bas

Can i deactivate the touch screen driver or activate the ADC ports differently?

As far as I’ve seen, the touch screen doesn’t deactivate although it should. This is higher TI magic or just a borken driver. Either drive the pins with a very low impedance (effectively overriding the pull-up/pull-down) or use one of the top 4 inputs gives you the best chance of a usable situation. IIRC not all of the first 4 inputs are ‘dirty’, but you’ll have to find out with a scope. Also not that the ‘dirt’ only happens if you have have channel(s) open for reading. Sometimes the read fails, other times you get wrong results. The original Bone had less problems : ( – Bas