On Sat, 9 Jan 2021 11:15:47 -0800 (PST), in
gmane.comp.hardware.beagleboard.user
"[email protected]"
<[email protected]> wrote:
>I recently upgraded my BBB to Debian 10 from the Beaglebone.org website.

        Which particular image?  Especially as "beaglebone.org" doesn't exist
as such -- it is beagleboard.org

        The top "latest-images" for BBB would be
https://debian.beagleboard.org/images/bone-debian-10.3-iot-armhf-2020-04-06-4gb.img.xz
(which, really, is getting a bit out of date -- might want to save some
time running a massive "apt update/apt upgrade" cycle by using one of the
newer images at https://rcn-ee.net/rootfs/bb.org/testing/ )

>Now my ADCs no longer work.  Everything I have found so far refers to the 
>old bone_cape_mgr that appears to no longer exist.  So, in light of this 
>how does one turn the ADCs back on?  And what other functions are no longer 
>going to work? 

        ADC should be active per /boot/uEnv.txt

###Disable auto loading of virtual capes (emmc/video/wireless/adc)
#disable_uboot_overlay_emmc=1
#disable_uboot_overlay_video=1
#disable_uboot_overlay_audio=1
#disable_uboot_overlay_wireless=1
#disable_uboot_overlay_adc=1

{NOTE: removing the # is what DISABLES that overlay}

###Cape Universal Enable
enable_uboot_cape_universal=1
###

        On the system with the above settings I get... (using the older
config-pin script, the default executable is more limited)

debian@beaglebone:~$
/opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin -i
p9-39
Pin is not modifiable: P9_39 AIN0
debian@beaglebone:~$
/opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin -q
p9-39
Pin is not modifiable: P9_39 AIN0
debian@beaglebone:~$
/opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin -l
p9-39
Pin is not modifiable: p9-39 AIN0
debian@beaglebone:~$


debian@beaglebone:~$ which config-pin
/usr/bin/config-pin
debian@beaglebone:~$ config-pin -h

GPIO Pin Configurator

Usage: config-pin -c <filename>
       config-pin -l <pin>
       config-pin -q <pin>
       config-pin <pin> <mode>

debian@beaglebone:~$ config-pin -l p9-39
ERROR: open() for
/sys/firmware/devicetree/base/ocp/P9-39_pinmux/pinctrl-names failed, No
such file or directory
debian@beaglebone:~$ config-pin -q p9-39
ERROR: open() for /sys/devices/platform/ocp/ocp:P9-39_pinmux/state failed,
No such file or directory
debian@beaglebone:~$

        DISABLING the ADC in uEnv.txt and rebooting gives... No change... the
pin is still AIN0,,, But trying to read it using Python/Adafruit fails...
Restoring the ADC in uEnv.txt allows Python to...

debian@beaglebone:~$ python3
Python 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import Adafruit_BBIO.ADC as adc
>>> adc.setup()
>>> adc.read("P9_39")
0.8969475030899048
>>> adc.read("P9_39")
0.8974359035491943
>>> adc.read("P9_39")
0.8964591026306152
>>>

My ADCs are currently floating -- nothing connected to the pins.

>>> for i in range(7):
...     print (adc.read("AIN%s" % i))
...
0.8954823017120361
0.7684981822967529
0.8268620371818542
0.32869353890419006
0.3035409152507782
0.46959707140922546
0.46984127163887024
>>>





-- 
Dennis L Bieber

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/7mfkvftnmcnhefi2r19r60v3psnkc1e1qk%404ax.com.

Reply via email to