You must be logged in to reply.

Page 3 of 3 out of 27 messages.

GHI support for OSD3358 TH

Reply #20 — Posted 3mth ago
by KG1 | Senior | 4,079 exp
Reply #20 — Posted 3mth ago
by KG1 | Senior | 4,079 exp
@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.
Reply #21 — Posted 3mth ago
by RoSchmi | King | 26,368 exp
Reply #21 — Posted 3mth ago
by RoSchmi | King | 26,368 exp
@KG1 - Clapping Clapping Clapping
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 ?
Reply #22 — Posted 3mth ago
by KG1 | Senior | 4,079 exp
Reply #22 — Posted 3mth ago
by KG1 | Senior | 4,079 exp
@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.
Reply #23 — Posted 3mth ago (modified)
by RoSchmi | King | 26,368 exp
Reply #23 — Posted 3mth ago (modified)
by RoSchmi | King | 26,368 exp
KG1 says:

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?

The following text ist edited:
Here is the actuel Content of uEnv.txt
cape_universaln is not a Problem, so it is left as it was.

root@beaglebone:/boot# cat uEnv.txt
#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

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

# The following line is needed to enable ADC
cape_enable=bone_capemgr.enable_partno=BB-ADC

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#
(Listing is edited)
Now, as Analog Input is working I can read and test a little bit for better understanding of how device tree overlays work.
Again, thanks a lot.
Roland
2 likes
Reply #24 — Posted 3mth ago
by KG1 | Senior | 4,079 exp
Reply #24 — Posted 3mth ago
by KG1 | Senior | 4,079 exp
This link provides an excellent one page summary regarding capemgr and universal io:
https://groups.google.com/forum/#!category-topic/beagleboard/beaglebone-black-wireless/RewjY34TPYE
which provides this link:
https://github.com/cdsteinkuehler/beaglebone-universal-io
and for those who own a BBBW always read anything written by RobertCNelson:
https://groups.google.com/forum/#!categories/beagleboard/beaglebone-black-wireless
he is not hard to find. He is the guru geek of embedded Linux.
Once you have read through the BBBW forum you will understand what is required to configure wireless with connman.
Cheers,
Kevin.
Reply #25 — Posted 3mth ago
by KG1 | Senior | 4,079 exp
Reply #25 — Posted 3mth ago
by KG1 | Senior | 4,079 exp
Beaglebone Black Wireless: further progress:
http://www.rescuerobot.org/drupal/?q=content/beaglebone-black-wireless
Reply #26 — Posted 3mth ago
by RoSchmi | King | 26,368 exp
Reply #26 — Posted 3mth ago
by RoSchmi | King | 26,368 exp
@KG1 - thanks for the helpful documentation.

Page 3 of 3 out of 27 messages.

You must be logged in to reply.