GHI support for OSD3358 TH

I’m playing with the GHI OSD3358 TH but I’m still missing some support to use all the functions of the board.
I read the OSD3358 Developers’ Guide
https://www.ghielectronics.com/docs/348/osd3358-developers-guide
and I followed the Articles of @ mcalsyn
http://kb.pervasive.digital/Home/Categories/octavo-beaglebone-black
got everything working and could use some GPIO digital outputs after reading the Adafruit tutorials.
However I could not find advice how to use e.g. PWM, Analog In, UART, SPI, I2C.
Did anyone find out, how to use these functions?
Is it intended by GHI to give such support in future or will we have to search for everything ourselves?

@ RoSchmi - all our boards are beagle bone compatible, just lookup analog on beagle bone and the same code will work.

thanks,
I tried apython Analog Input exampel from the Adafruit page:

import Adafruit_BBIO.ADC as ADC
import time
sensor_pin = ‘P9_40’
ADC.setup()
while True:
reading = ADC.read(sensor_pin)
millivolts = reading * 1800 # 1.8V reference = 1800 mV
temp_c = (millivolts - 500) / 10
temp_f = (temp_c * 9/5) + 32
print(‘mv=%d C=%d F=%d’ % (millivolts, temp_c, temp_f))
time.sleep(1)

I tried P9_33 through P9_40

but every time I get a runtime error message:

Traceback (most recent call last):
File “tmp36.py”, line 6, in
ADC.setup()
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

@ RoSchmi -

I have no idea but would you need to follow:

@ willgeorge - thanks, yes, I’m just in the moment on this page to see if everything is installed correctly

So support for the functionality of the device is supposed to be on the BBB forums an stuff. Also books are good resources (for everything except advanced PRU development.)

[url]http://amzn.com/1118935128[/url]

@ RoSchmi -
Happy New Year RoSchmi
You have two possible error messages:

@ KG1 - Thanks Kevin for this very informative page, and the best wishes for the new year as well.
The configuration of the Cape Manger is correct.
It seem that on the OSD3358 the cape “cape-universaln” is installed:

root@ beaglebone:/boot# cat uEnv.txt
uname_r=4.4.9-ti-r25
#uuid=
#dtb=

##BeagleBone Green: eMMC disabled
#dtb=am335x-bonegreen-overlay.dtb

cmdline=coherent_pool=1M quiet cape_universal=enable

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M quiet cape_universal=enable video=HDMI-A-1:1024x768@ 60e

root@ beaglebone:/sys/devices/platform/bone_capemgr# cat slots
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,cape-universaln

I think, that there must be a conflict between cape-universaln and the Adafruit Adafruit_BBIO.ADC library but I don’t know how to solve.

@ RoSchmi -
If you are looking for a starting point for BBB I recommend:
DR. DEREK MOLLOY is a senior lecturer at the School of Electronic Engineering, Faculty of Engineering and Computing, Dublin City University, Ireland.
His book “Exploring BeagleBone: Tools and Techniques for Building with Embedded Linux” is now dated (2013) but the best for a practical approach. [url]http://au.wiley.com/WileyCDA/WileyTitle/productCd-1118935128.html[/url]
I have his book in Kindle and looking at location 6710 something about:
sudo sh -c “echo BB-ADC > $SLOTS”
His book is a good starting point.
“It seem that on the OSD3358 the cape “cape-universaln” is installed”
Much has happened with BBB since Ångström Linux kernel 3.8 The BBB today generally comes with Debian. What is the os and version?
I guess the cape_universal entry came with the os and was provided by GHI on the eMMC?
Is there a method of forcing the OSD3358 HT to boot off an SD card? This may be a better way to go.
The pins taken by eMMC and HDMI are shown in the coloured diagram near the bottom of my web page. Does the OSD3358 HT use virtual capes for eMMC or HDMI?
Is the Adafruit library compatible with the cape_universal? Does the library automatically take slots? Does this conflict with the cape_universal? Try disabling the cape_universal in the uEnv.txt see [url]https://github.com/beagleboard/bb.org-overlays[/url] bottom of page.
I recommend that anyone starting out with BBB or OSD3358 HT should use the current/latest Debian os:
[url]BeagleBoard.org - Page not found and boot from an SD card.
Flash this to eMMC when your embedded system is complete and final.
Use Google with “latest 12 months”. Sorting out hits can be difficult re BBB.
Best regards,
Kevin.

@ KG1 - thanks for your suggestions.
I found a link, that the failure seems to be in the Adafruit_BBIO.ADC library.

I’m now going to set up a new System SD-Card with the latest Versions.

1 Like

@ RoSchmi -
Some interesting links:
[url]https://pypi.python.org/pypi/Adafruit_BBIO/1.0.0[/url]
Merge pull request #96 from PeteLawler for ADC support in Linux kernel 4.1+

BBB(BeagleBoneBlack) [No.007] : Install Adafruit_BBIO (Adafruit-BeagleBone-IO-Python) on Debian
[url]http://qiita.com/greenxmleigh/items/2f9600eb7e1cd1339965[/url]

root@ beaglebone:~# apt-get update
root@ beaglebone:~# apt-get install build-essential python-dev python-setuptools python-pip python-smbus -y

Let us know your progress.
Kevin.

I set up a System SD_Card with the latest Image:
BeagleBoard.org Debian Image 2016-11-06
Actualized everthing with apt-get update and apt-get upgrade

Installed the new version: Adafruit_BBIO 1.0.1
and… the same runtime error:

import Adafruit_BBIO.ADC as ADC
ADC.setup()
[ 340.567298] bone_capemgr bone_capemgr: part_number ‘BB-ADC’, version ‘N/A’
[ 340.574343] bone_capemgr bone_capemgr: slot #5: override
[ 340.579776] bone_capemgr bone_capemgr: Using override eeprom data at slot 5
[ 340.586828] bone_capemgr bone_capemgr: slot #5: ‘Override Board Name,00A0,Override Manuf,BB-ADC’
[ 340.617979] bone_capemgr bone_capemgr: slot #5: dtbo ‘BB-ADC-00A0.dtbo’ loaded; overlay id #1
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: helpe

Can anybody test if this error happens on the original Beaglebone Black too?

@ RoSchmi -
Please provide the output from these commands:
root@ beaglebone:~# zcat /proc/config.gz | grep CONFIG_BONE_CAPEMGR
root@ beaglebone:~# dtc --version
root@ beaglebone:~# ls -al /lib/firmware/
root@ beaglebone:/boot# cat uEnv.txt
root@ beaglebone:/# cat /sys/devices/platform/bone_capemgr/slots
root@ beaglebone:/etc/default# cat capemgr
Make sure you read:
GitHub - beagleboard/bb.org-overlays: Device Tree Overlays for bb.org boards (readme.md)
Now that you have an up-to-date system (capemgr up-to-date) readme.md is the best starting point.
You are not limited by linux bugs. It is very unlikely that Adafruit_BBIO 1.0.1 is causing the failure. These error messages by linux are more like warnings about configuration problems.
Do you have a serial connection to your board so that you are able to see the complete bootup messages?
Could you please provide a photo of your setup / wiring / board? If it is confidential please consider emailing it to me.
“Using override eeprom data at slot 5” Is there a eeprom which capemgr might find?
Have you tried running OSD3358HT without any ADC connections?
Is the library using P9_40? Have you totally disabled HDMI video and audio?
Do you have a display connected to OSD3358HT?
When you run: cat /sys/devices/platform/bone_capemgr/slots what is in slot #5 ?

Justin Cooper the author of the Adafruit_BBIO 1.0.1 library was an employee of Adafruit.

RobertCNelson replies to this issue.

On GitHub - beagleboard/bb.org-overlays: Device Tree Overlays for bb.org boards do you see the name RobertCNelson?
Robert C Nelson: Guru Geek of imbedded linux
RobertCNelson (Robert Nelson) · GitHub
https://plus.google.com/u/0/106813818225399872098
BeagleBoard.org - discuss (Search for RobertCNelson)
RobertCNelson is your last possible source of information. BUT GHI should confirm that OSD3358HT hardware is designed to manage eeprom’s on capes (is equivalent to BBB in all aspects) before you contact RobertCNelson.

Tomorrow I will receive a “Beaglebone Black Wireless GHI” to which I will connect a 4DCAPE-70T display. I will use Debian and try the Adafruit_BBIO 1.0.1 library. I will setup blink LED straight and via the library. I am not technical so lets hope someone else offers to assist.

Further reference:
Embedded Linux for Developers Pages: 989 Kindle US$69.99

You are the pioneer of OSD3358 development. Keep moving forward!

Best regards,
Kevin.

@ KG1 -
Thanks Kevin for your interest and spending time
I can answer only some of your questions now because it’s already late here

root@ beaglebone:~# zcat /proc/config.gz | grep CONFIG_BONE_CAPEMGR
CONFIG_BONE_CAPEMGR=y

root@ beaglebone:~# dtc --version
Version: DTC 1.4.1

root@ beaglebone:~# ls -al /lib/firmware/
total 48728
drwxr-xr-x 14 root root 20480 Jan 3 00:35 .
drwxr-xr-x 17 root root 4096 Nov 6 16:11 …
-rw-r–r-- 1 root root 1102 Jan 3 00:35 ADAFRUIT-SPI0-00A0.dtbo
-rw-r–r-- 1 root root 1105 Jan 3 00:35 ADAFRUIT-SPI1-00A0.dtbo
-rw-r–r-- 1 root root 867 Jan 3 00:35 ADAFRUIT-UART1-00A0.dtbo
-rw-r–r-- 1 root root 867 Jan 3 00:35 ADAFRUIT-UART2-00A0.dtbo
-rw-r–r-- 1 root root 867 Jan 3 00:35 ADAFRUIT-UART4-00A0.dtbo
-rw-r–r-- 1 root root 867 Jan 3 00:35 ADAFRUIT-UART5-00A0.dtbo
-rw-r–r-- 1 root root 1205 Nov 22 16:28 am33xx_pwm-00A0.dtbo
drwxr-xr-x 2 root root 4096 Jan 3 00:20 ar3k
-rw-r–r-- 1 root root 153416 Dec 14 17:50 ar5523.bin
-rw-r–r-- 1 root root 70624 Dec 14 17:50 ar7010_1_1.fw
-rw-r–r-- 1 root root 70624 Dec 14 17:50 ar7010.fw
-rw-r–r-- 1 root root 51312 Dec 14 17:50 ar9271.fw
drwxr-xr-x 10 root root 4096 Nov 6 15:58 ath10k
-rw-r–r-- 1 root root 246804 Dec 14 17:50 ath3k-1.fw
drwxr-xr-x 5 root root 4096 Nov 6 15:48 ath6k
drwxr-xr-x 2 root root 4096 Jan 3 00:20 ath9k_htc
-rw-r–r-- 1 root root 695 Nov 22 16:28 BB-ADC-00A0.dtbo
-rw-r–r-- 1 root root 2418 Nov 22 16:28 BB-BBBMINI-00A0.dtbo
-rw-r–r-- 1 root root 4578 Nov 22 16:28 BB-BONE-4D4C-01-00A1.dtbo
-rw-r–r-- 1 root root 3438 Nov 22 16:28 BB-BONE-4D4N-01-00A1.dtbo
-rw-r–r-- 1 root root 4516 Nov 22 16:28 BB-BONE-4D4R-01-00A1.dtbo
-rw-r–r-- 1 root root 4578 Nov 22 16:28 BB-BONE-4D5C-01-00A1.dtbo
-rw-r–r-- 1 root root 3438 Nov 22 16:28 BB-BONE-4D5N-01-00A1.dtbo
-rw-r–r-- 1 root root 4516 Nov 22 16:28 BB-BONE-4D5R-01-00A1.dtbo
-rw-r–r-- 1 root root 4578 Nov 22 16:28 BB-BONE-4D7C-01-00A1.dtbo
-rw-r–r-- 1 root root 3438 Nov 22 16:28 BB-BONE-4D7N-01-00A1.dtbo
-rw-r–r-- 1 root root 4516 Nov 22 16:28 BB-BONE-4D7R-01-00A1.dtbo
-rw-r–r-- 1 root root 2859 Nov 22 16:28 BB-BONE-AUDI-02-00A0.dtbo
-rw-r–r-- 1 root root 2964 Nov 22 16:28 BB-BONE-BACONE-00A0.dtbo
-rw-r–r-- 1 root root 1684 Nov 22 16:28 BB-BONE-CRYPTO-00A0.dtbo
-rw-r–r-- 1 root root 2247 Nov 22 16:28 BB-BONE-DVID-01-00A3.dtbo
-rw-r–r-- 1 root root 5600 Nov 22 16:28 BB-BONE-LCD3-01-00A2.dtbo
-rw-r–r-- 1 root root 5597 Nov 22 16:28 BB-BONE-LCD4-01-00A1.dtbo
-rw-r–r-- 1 root root 4407 Nov 22 16:28 BB-BONE-LCD5-01-00A1.dtbo
-rw-r–r-- 1 root root 4353 Nov 22 16:28 BB-BONE-LCD7-01-00A1.dtbo
-rw-r–r-- 1 root root 5579 Nov 22 16:28 BB-BONE-LCD7-01-00A2.dtbo
-rw-r–r-- 1 root root 5597 Nov 22 16:28 BB-BONE-LCD7-01-00A3.dtbo
-rw-r–r-- 1 root root 2618 Nov 22 16:28 BB-BONE-REACH-00A0.dtbo
-rw-r–r-- 1 root root 6229 Nov 22 16:28 BB-BONE-REPLICAP-00A4.dtbo
-rw-r–r-- 1 root root 6579 Nov 22 16:28 BB-BONE-REPLICAP-00B1.dtbo
-rw-r–r-- 1 root root 6559 Nov 22 16:28 BB-BONE-REPLICAP-00B2.dtbo
-rw-r–r-- 1 root root 6559 Nov 22 16:28 BB-BONE-REPLICAP-00B3.dtbo
-rw-r–r-- 1 root root 6229 Nov 22 16:28 BB-BONE-REPLICAP-0A4A.dtbo
-rw-r–r-- 1 root root 887 Nov 22 16:28 BB-BONE-SERL-03-00A1.dtbo
-rw-r–r-- 1 root root 4812 Nov 22 16:28 BB-BONE-WL1837-00A0.dtbo
-rw-r–r-- 1 root root 594 Nov 22 16:28 BB-BONE-WTHR-01-00B0.dtbo
-rw-r–r-- 1 root root 871 Nov 22 16:28 BB-CAN1-00A0.dtbo
-rw-r–r-- 1 root root 4518 Nov 22 16:28 BB-CAPE-DISP-CT4-00A0.dtbo
-rw-r–r-- 1 root root 960 Nov 22 16:28 BB-I2C1-00A0.dtbo
-rw-r–r-- 1 root root 1901 Nov 22 16:28 BB-I2C1-PCA9685-00A0.dtbo
-rw-r–r-- 1 root root 960 Nov 22 16:28 BB-I2C2-00A0.dtbo
-rw-r–r-- 1 root root 1198 Nov 22 16:28 BB-PWM0-00A0.dtbo
-rw-r–r-- 1 root root 1198 Nov 22 16:28 BB-PWM1-00A0.dtbo
-rw-r–r-- 1 root root 1198 Nov 22 16:28 BB-PWM2-00A0.dtbo
-rw-r–r-- 1 root root 1525 Nov 22 16:28 BB-RELAY-4PORT-00A0.dtbo
-rw-r–r-- 1 root root 1642 Nov 22 16:28 BB-RTC-01-00A0.dtbo
-rw-r–r-- 1 root root 1082 Nov 22 16:28 BB-SPI0-MCP3008-00A0.dtbo
-rw-r–r-- 1 root root 1235 Nov 22 16:28 BB-SPIDEV0-00A0.dtbo
-rw-r–r-- 1 root root 1235 Nov 22 16:28 BB-SPIDEV1-00A0.dtbo
-rw-r–r-- 1 root root 1239 Nov 22 16:28 BB-SPIDEV1A1-00A0.dtbo
-rw-r–r-- 1 root root 883 Nov 22 16:28 BB-UART1-00A0.dtbo
-rw-r–r-- 1 root root 883 Nov 22 16:28 BB-UART2-00A0.dtbo
-rw-r–r-- 1 root root 915 Nov 22 16:28 BB-UART2-RTSCTS-00A0.dtbo
-rw-r–r-- 1 root root 867 Nov 22 16:28 BB-UART3-00A0.dtbo
-rw-r–r-- 1 root root 883 Nov 22 16:28 BB-UART4-00A0.dtbo
-rw-r–r-- 1 root root 1127 Nov 22 16:28 BB-UART4-RS485-00A0.dtbo
-rw-r–r-- 1 root root 883 Nov 22 16:28 BB-UART5-00A0.dtbo
-rw-r–r-- 1 root root 5554 Nov 22 16:28 BB-VIEW-LCD4-01-00A0.dtbo
-rw-r–r-- 1 root root 5554 Nov 22 16:28 BB-VIEW-LCD7-01-00A0.dtbo
-rw-r–r-- 1 root root 974 Nov 22 16:28 BB-W1-P9.12-00A0.dtbo
-rw-r–r-- 1 root root 7214 Nov 22 16:28 BEAGLEBOY-0013.dtbo
-rw-r–r-- 1 root root 1171 Nov 22 16:28 bone_eqep0-00A0.dtbo
-rw-r–r-- 1 root root 1187 Nov 22 16:28 bone_eqep1-00A0.dtbo
-rw-r–r-- 1 root root 1187 Nov 22 16:28 bone_eqep2-00A0.dtbo
-rw-r–r-- 1 root root 1187 Nov 22 16:28 bone_eqep2b-00A0.dtbo
drwxr-xr-x 2 root root 4096 Nov 6 15:56 brcm
-rw-r–r-- 1 root root 3489 Nov 22 16:28 cape-bone-ibb-00A0.dtbo
-rw-r–r-- 1 root root 1703 Nov 22 16:28 cape-CBB-Serial-r01.dtbo
-rw-r–r-- 1 root root 8414 Nov 22 16:28 cape-univ-audio-00A0.dtbo
-rw-r–r-- 1 root root 12535 Nov 22 16:28 cape-univ-emmc-00A0.dtbo
-rw-r–r-- 1 root root 54730 Nov 22 16:28 cape-universal-00A0.dtbo
-rw-r–r-- 1 root root 102705 Nov 22 16:28 cape-universala-00A0.dtbo
-rw-r–r-- 1 root root 54730 Nov 22 16:28 cape-universaln-00A0.dtbo
-rw-r–r-- 1 root root 29877 Nov 22 16:28 cape-univ-hdmi-00A0.dtbo
-rw-r–r-- 1 root root 13388 Nov 6 15:56 carl9170-1.fw
-rw-r–r-- 1 root root 1057 Nov 22 16:28 dev-USB-PWR-CTL-00A1.dtbo
-rw-r–r-- 1 root root 21667092 Oct 27 19:45 dra7-dsp1-fw.xe66
-rw-r–r-- 1 root root 21667092 Oct 27 19:45 dra7-dsp2-fw.xe66
-rw-r–r-- 1 root root 3493184 Oct 27 16:53 dra7-ipu2-fw.xem4
-rw-r–r-- 1 root root 567200 Oct 27 16:53 dra7-ipu2-fw.xem4.map
-rw-r–r-- 1 root root 3717 Nov 22 16:28 DVK530-LCD4-01-00A0.dtbo
-rw-r–r-- 1 root root 4416 Nov 22 16:28 GHI-DB-NH5C-00A0.dtbo
-rw-r–r-- 1 root root 2182 Nov 22 16:28 GHI-LCD-00A0.dtbo
-rw-r–r-- 1 root root 3057 Nov 22 16:28 GHI-TH-NH43C-00A0.dtbo
-rw-r–r-- 1 root root 2526 Nov 22 16:28 GHI-TH-NH43R-00A0.dtbo
-rw-r–r-- 1 root root 3053 Nov 22 16:28 GHI-TH-NH7C-00A0.dtbo
-rw-r–r-- 1 root root 72684 Dec 14 17:50 htc_7010.fw
-rw-r–r-- 1 root root 50980 Dec 14 17:50 htc_9271.fw
-rw-r–r-- 1 root root 1946 Nov 6 15:56 LICENCE.atheros_firmware
-rw-r–r-- 1 root root 4178 Nov 6 15:56 LICENCE.broadcom_bcm43xx
-rw-r–r-- 1 root root 2115 Nov 6 15:56 LICENCE.rtlwifi_firmware.txt
-rw-r–r-- 1 root root 2913 Nov 6 15:56 LICENCE.ti-connectivity
-rw-r–r-- 1 root root 45412 Nov 6 15:56 mt7601u.bin
-rw-r–r-- 1 root root 2542 Nov 22 16:28 NL-AB-BBBC-00D0.dtbo
-rw-r–r-- 1 root root 737 May 28 2015 PyBBIO-ADC-00A0.dtbo
-rw-r–r-- 1 root root 672 May 28 2015 PyBBIO-AIN0-00A0.dtbo
-rw-r–r-- 1 root root 672 May 28 2015 PyBBIO-AIN1-00A0.dtbo
-rw-r–r-- 1 root root 672 May 28 2015 PyBBIO-AIN2-00A0.dtbo
-rw-r–r-- 1 root root 672 May 28 2015 PyBBIO-AIN3-00A0.dtbo
-rw-r–r-- 1 root root 672 May 28 2015 PyBBIO-AIN4-00A0.dtbo
-rw-r–r-- 1 root root 672 May 28 2015 PyBBIO-AIN5-00A0.dtbo
-rw-r–r-- 1 root root 672 May 28 2015 PyBBIO-AIN6-00A0.dtbo
-rw-r–r-- 1 root root 672 May 28 2015 PyBBIO-AIN7-00A0.dtbo
-rw-r–r-- 1 root root 351 May 28 2015 PyBBIO-ecap0-00A0.dtbo
-rw-r–r-- 1 root root 351 May 28 2015 PyBBIO-ecap1-00A0.dtbo
-rw-r–r-- 1 root root 353 May 28 2015 PyBBIO-ehrpwm1-00A0.dtbo
-rw-r–r-- 1 root root 353 May 28 2015 PyBBIO-ehrpwm2-00A0.dtbo
-rw-r–r-- 1 root root 353 May 28 2015 PyBBIO-epwmss0-00A0.dtbo
-rw-r–r-- 1 root root 353 May 28 2015 PyBBIO-epwmss1-00A0.dtbo
-rw-r–r-- 1 root root 353 May 28 2015 PyBBIO-epwmss2-00A0.dtbo
-rw-r–r-- 1 root root 994 May 28 2015 PyBBIO-eqep0-00A0.dtbo
-rw-r–r-- 1 root root 994 May 28 2015 PyBBIO-eqep1-00A0.dtbo
-rw-r–r-- 1 root root 994 May 28 2015 PyBBIO-eqep2-00A0.dtbo
-rw-r–r-- 1 root root 994 May 28 2015 PyBBIO-eqep2b-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio0_10-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio0_11-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio0_12-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio0_13-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio0_14-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio0_15-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio0_20-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio0_2-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio0_22-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio0_23-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio0_26-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio0_27-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio0_30-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio0_3-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio0_31-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio0_4-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio0_5-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio0_7-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio0_8-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio0_9-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio1_0-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio1_1-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio1_12-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio1_13-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio1_14-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio1_15-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio1_16-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio1_17-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio1_18-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio1_19-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio1_2-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio1_28-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio1_29-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio1_30-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio1_3-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio1_31-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio1_4-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio1_5-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio1_6-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio1_7-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio2_10-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio2_1-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio2_11-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio2_12-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio2_13-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio2_14-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio2_15-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio2_16-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio2_17-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio2_2-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio2_22-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio2_23-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio2_24-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio2_25-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio2_3-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio2_4-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio2_5-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio2_6-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio2_7-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio2_8-00A0.dtbo
-rw-r–r-- 1 root root 2402 May 28 2015 PyBBIO-gpio2_9-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio3_14-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio3_15-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio3_16-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio3_17-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio3_19-00A0.dtbo
-rw-r–r-- 1 root root 2424 May 28 2015 PyBBIO-gpio3_21-00A0.dtbo
-rw-r–r-- 1 root root 2316 May 28 2015 PyBBIO-usr0-00A0.dtbo
-rw-r–r-- 1 root root 2316 May 28 2015 PyBBIO-usr1-00A0.dtbo
-rw-r–r-- 1 root root 2316 May 28 2015 PyBBIO-usr2-00A0.dtbo
-rw-r–r-- 1 root root 2316 May 28 2015 PyBBIO-usr3-00A0.dtbo
drwxr-xr-x 2 root root 4096 Jan 3 00:20 qca
-rw-r–r-- 1 root root 7842 Nov 22 16:28 RoboticsCape-00A0.dtbo
-rw-r–r-- 1 root root 8192 Jun 16 2014 rt2561.bin
-rw-r–r-- 1 root root 8192 Jun 16 2014 rt2561s.bin
-rw-r–r-- 1 root root 8192 Jun 16 2014 rt2661.bin
-rw-r–r-- 1 root root 8192 Jun 16 2014 rt2860.bin
-rw-r–r-- 1 root root 8192 Jun 16 2014 rt2870.bin
lrwxrwxrwx 1 root root 10 Jun 16 2014 rt3070.bin → rt2870.bin
-rw-r–r-- 1 root root 4096 Jun 16 2014 rt3071.bin
lrwxrwxrwx 1 root root 10 Jun 16 2014 rt3090.bin → rt2860.bin
-rw-r–r-- 1 root root 4096 Jun 16 2014 rt3290.bin
-rw-r–r-- 1 root root 2048 Jun 16 2014 rt73.bin
drwxr-xr-x 2 root root 4096 Jan 3 00:20 RTL8192E
drwxr-xr-x 2 root root 4096 Jan 3 00:20 rtl_bt
drwxr-xr-x 2 root root 4096 Jan 3 00:20 rtl_nic
drwxr-xr-x 2 root root 4096 Jan 3 00:20 rtlwifi
drwxr-xr-x 2 root root 4096 Nov 6 16:13 ti-connectivity
-rw-r–r-- 1 root root 375 Nov 22 16:28 uio_pruss_enable-00A0.dtbo
-rw-r–r-- 1 root root 101053 Nov 22 16:28 univ-all-00A0.dtbo
-rw-r–r-- 1 root root 89586 Nov 22 16:28 univ-bbgw-00A0.dtbo
-rw-r–r-- 1 root root 96765 Nov 22 16:28 univ-emmc-00A0.dtbo
-rw-r–r-- 1 root root 89037 Nov 22 16:28 univ-hdmi-00A0.dtbo
-rw-r–r-- 1 root root 91311 Nov 22 16:28 univ-nhdmi-00A0.dtbo
-rw-r–r-- 1 root root 4002 Sep 29 18:35 vpdma-1b8.bin
drwxr-xr-x 2 root root 4096 Nov 6 15:48 zd1211

root@ beaglebone:/boot# cat uEnv.txt (I outcommented this line: cmdline=coherent_pool=1M quiet cape_universal=enable)

#Docs: Beagleboard:U-boot partitioning layout 2.0 - eLinux.org

uname_r=4.4.30-ti-r64
#uuid=
#dtb=

##BeagleBone Black/Green dtb’s for v4.1.x (BeagleBone White just works…)

##BeagleBone Black: HDMI (Audio/Video) disabled:
#dtb=am335x-boneblack-emmc-overlay.dtb

##BeagleBone Black: eMMC disabled:
#dtb=am335x-boneblack-hdmi-overlay.dtb

##BeagleBone Black: HDMI Audio/eMMC disabled:
#dtb=am335x-boneblack-nhdmi-overlay.dtb

##BeagleBone Black: HDMI (Audio/Video)/eMMC disabled:
#dtb=am335x-boneblack-overlay.dtb

##BeagleBone Black: wl1835
#dtb=am335x-boneblack-wl1835mod.dtb

##BeagleBone Green: eMMC disabled
#dtb=am335x-bonegreen-overlay.dtb

#cmdline=coherent_pool=1M quiet cape_universal=enable

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M quiet cape_universal=enable video=HDMI-A-1:1024x768@ 60e

##Example v3.8.x
#cape_disable=capemgr.disable_partno=
#cape_enable=capemgr.enable_partno=

##Example v4.1.x
#cape_disable=bone_capemgr.disable_partno=
#cape_enable=bone_capemgr.enable_partno=

##enable Generic eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

root@ beaglebone:/boot# cat /sys/devices/platform/bone_capemgr/slots
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1

root@ beaglebone:/etc/default# cat capemgr

Default settings for capemgr. This file is sourced by /bin/sh from

/etc/init.d/capemgr.sh

Options to pass to capemgr

CAPE=


Then I do:

root@ beaglebone:~# python
Python 2.7.9 (default, Aug 13 2016, 17:56:53)
[GCC 4.9.2] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

import Adafruit_BBIO.ADC as ADC
ADC.setup()
[ 1543.435703] bone_capemgr bone_capemgr: part_number ‘BB-ADC’, version ‘N/A’
[ 1543.442750] bone_capemgr bone_capemgr: slot #4: override
[ 1543.448173] bone_capemgr bone_capemgr: Using override eeprom data at slot 4
[ 1543.455225] bone_capemgr bone_capemgr: slot #4: ‘Override Board Name,00A0,Override Manuf,BB-ADC’
[ 1543.479557] bone_capemgr bone_capemgr: slot #4: dtbo ‘BB-ADC-00A0.dtbo’ loaded; overlay id #0
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

After this when I look at the slots:

root@ beaglebone:~# cat /sys/devices/platform/bone_capemgr/slots
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,BB-ADC

… I must stop now, it’s too late
until tomorrow Roland

@ RoSchmi -
This an improvement:
P-O-L- 0 Override Board Name,00A0,Override Manuf,cape-universaln
has gone! Thank you but no thank you GHI.
now we have all by itself:
P-O-L- 0 Override Board Name,00A0,Override Manuf,BB-ADC
we have it compiled & installed:
-rw-r–r-- 1 root root 695 Nov 22 16:28 BB-ADC-00A0.dtbo
#cd /opt/source/bb.org-overlays/src/arm/
#cat BB-ADC-00A0.dts
now we can see the source code:
//resources this cape uses
exclusive-use =
“P9.39”, //AIN0 //All of these are 1.8V tolerant
“P9.40”, //AIN1
“P9.37”, //AIN2
“P9.38”, //AIN3
“P9.33”, //AIN4
“P9.36”, //AIN5
“P9.35”, //AIN6

looking at the coloured diagram at the bottom of my web page:
P9.32 to P9.40 Memory address and control lines (9 pins) Cannot be muxed
Not sure about that: Look here:
https://vadl.github.io/beagleboneblack/2016/07/29/setting-up-bbb-gpio
16 July 2016 this is a great article. According to the chart no mux is possible for P9.32 to P9.40.
I cant see how any conflict is possible.
Lets push on and test BB-ADC:
#cd /sys/bus/iio/devices/iio:device0
#ls -al
I am not sure which AIN your circuit uses: lets try:
#cat in_voltage1_raw
Keep repeating this command looking for 0 to 4096 if 12 bit ADC.
If this does not work uncomment:
#dtb=am335x-boneblack-overlay.dtb
in /boot/uEnv.txt
and try test again.
Hope this helps Roland.
Cheers,
Kevin.

@ KG1 - trying to follow your advice but I cannot find Directory iio.
root@ beaglebone:/sys/bus# ls
clockevents cpu i2c mmc scsi soc virtio
clocksource event_source mdio_bus nvmem sdio spi workqueue
container hid media platform serio usb
root@ beaglebone:/sys/bus# cd iio
-bash: cd: iio: No such file or directory

Thanks, I’ll try.

Are you using an OSD3358 or Beaglebone? If yes, which environment are you using and how is your experience?

@ RoSchmi -
Lets try a different approach and exclude the library for now.
Add a new line to the uEnv.txt file:
cape_enable=bone_capemgr.enable_partno=BB-ADC
reboot (everytime after changes to uEnv.txt)

cat /sys/devices/platform/bone_capemgr/slots

Run test above.
if this does not work uncomment dtb=am335x-boneblack-overlay.dtb in uEnv.txt
reboot

cat /sys/devices/platform/bone_capemgr/slots

Run test above.
If we fail the test again it is time to ask GHI for comments re capemgr.
Best regards,
Kevin.

@ KG1 - :clap: :clap: :clap:
Yes, your last approach with “cape_enable=bone_capemgr.enable_partno=BB-ADC” in uEnv.txt worked

root@ beaglebone:~# cat /sys/devices/platform/bone_capemgr/slots
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,BB-ADC
root@ beaglebone:~# cd /sys/bus/

//now directory iio is there !!!
root@ beaglebone:/sys/bus# ls
clockevents cpu i2c media platform serio usb
clocksource event_source iio mmc scsi soc virtio
container hid mdio_bus nvmem sdio spi workqueue

root@ beaglebone:/sys/bus/iio/devices/iio:device0# ls -al
total 0
drwxr-xr-x 5 root root 0 Jan 4 14:48 .
drwxr-xr-x 4 root root 0 Jan 4 14:48 …
drwxr-xr-x 2 root root 0 Jan 4 14:56 buffer
-r–r–r-- 1 root root 4096 Jan 4 14:56 dev
-rw-r–r-- 1 root root 4096 Jan 4 14:56 in_voltage0_raw
-rw-r–r-- 1 root root 4096 Jan 4 14:56 in_voltage1_raw
-rw-r–r-- 1 root root 4096 Jan 4 14:56 in_voltage2_raw
-rw-r–r-- 1 root root 4096 Jan 4 14:56 in_voltage3_raw
-rw-r–r-- 1 root root 4096 Jan 4 14:56 in_voltage4_raw
-rw-r–r-- 1 root root 4096 Jan 4 14:56 in_voltage5_raw
-rw-r–r-- 1 root root 4096 Jan 4 14:56 in_voltage6_raw
-r–r–r-- 1 root root 4096 Jan 4 14:56 name
lrwxrwxrwx 1 root root 0 Jan 4 14:56 of_node → …/…/…/…/…/…/firmware/devicetree/base/ocp/tscadc@ 44e0d000/adc
drwxr-xr-x 2 root root 0 Jan 4 14:56 power
drwxr-xr-x 2 root root 0 Jan 4 14:56 scan_elements
lrwxrwxrwx 1 root root 0 Jan 4 14:56 subsystem → …/…/…/…/…/…/bus/iio
-rw-r–r-- 1 root root 4096 Jan 4 14:48 uevent

root@ beaglebone:/sys/bus/iio/devices/iio:device0# cat in_voltage6_raw
3829

root@ beaglebone:/sys/bus/iio/devices/iio:device0# cat in_voltage6_raw
3831
root@ beaglebone:/sys/bus/iio/devices/iio:device0#

// and now python works as well

root@ beaglebone:~# python
Python 2.7.9 (default, Aug 13 2016, 17:56:53)
[GCC 4.9.2] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

import Adafruit_BBIO.ADC as ADC
import time
sensor_pin = ‘P9_35’
ADC.setup()
reading = ADC.read(sensor_pin)
print(reading)
0.935531139374

//what to do now with cape_universaln in uEnv.txt ?

@ RoSchmi -
Great news! Roland well done.
Re uEnv.txt
What is the current situation with uEnv.txt? To help others who follow you please
#cat uEnv.txt
and show output in your reply.
I am interested in dtb=am335x-boneblack-overlay.dtb and others: commented or uncommented?
As a learning exercise please consider setting up a serial connection to your host pc so that you can see the complete boot up messages. I have this working at the same time (both via usb) for ssh and serial terminal. It is a good learning exercise to observe all the capemgr entries.
In a sense you can plug & play with entries in uEnv.txt while watching the boot up messages. When you wish to add further GPIO’s UART I2C etc it is the best way to experiment with possible conflicts.
With regard to cape_universaln if it is not a problem don’t touch it.
If you want more pins and don’t want HDMI, uncomment the appropriate dtb=am335x-boneblack-overlay.dtb
Happy New Year,
Kevin.