Have you activated (PinMuxed) the pins correctly? Use the dtb-rebuilder of
Robert Nelson if not.
https://github.com/RobertCNelson/dtb-rebuilder/blob/4.1.x/src/arm/am335x-boneblack.dts
1.) Add the following lines within the am335x-boneblack.dts file to
activate *all* ADC pins.
& tscadc {
status = " okay ";
};
& am335x_adc {
ti , adc - channels = <0 1 2 3 4 5 6 7 >;
};
2) Make and Make install command within the dtb-rebuilder folder
After a reboot you can check if the ADC pins are activated properly by the
following procedure:
root@arm : cd / sys / bus / iio / devices / iio : device0
root@arm :/ sys / bus / iio / devices / iio : device0 # ls -l
...
-rw -r - -r - - 1 root root 4096 Aug 13 15:45 in_voltage0_raw
-rw -r - -r - - 1 root root 4096 Aug 13 15:45 in_voltage1_raw
-rw -r - -r - - 1 root root 4096 Aug 13 15:45 in_voltage2_raw
-rw -r - -r - - 1 root root 4096 Aug 13 15:45 in_voltage3_raw
-rw -r - -r - - 1 root root 4096 Aug 13 15:45 in_voltage4_raw
-rw -r - -r - - 1 root root 4096 Aug 13 15:45 in_voltage5_raw
-rw -r - -r - - 1 root root 4096 Aug 13 15:45 in_voltage6_raw
-rw -r - -r - - 1 root root 4096 Aug 13 15:45 in_voltage7_raw
...
If you see something like that, the pins are activated correctly. you can
measure them with cat in_voltageX_raw...
Regards
Benjamin
Am Donnerstag, 30. Juli 2015 07:44:42 UTC+2 schrieb Sina Chou:
>
> After I upgrade my kernel to 4.1.3-ti-r6.
>
> I try to use ADC utility in adafruit-beaglebone-io-python, the following
> error popups, but GPIO utility of the library is okay.
>
> anything wrong?
>
>
> import Adafruit_BBIO.ADC as ADC
> ADC.setup()
> Traceback (most recent call last):
> File "", line 1, in
> RuntimeError: Unable to setup ADC system. Possible causes are:
>
> - A cape with a conflicting pin mapping is loaded
> - A device tree object is loaded that uses the same name for a
> fragment: helper
>
>
>
> Anything I need to migrate if the kernel is migrated to 4.1.3-ti-r6 from
> 3.8.13.bone73 ??
> thanks
>
>
>
> Ivan
>
>
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.