0

Still issue with PWM on Ubuntu 16.04.2 TLS
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Still issue with PWM on Ubuntu 16.04.2 TLS

by drewfustini on Tue Jul 11, 2017 11:24 pm

I think an issue could be that uboot overlays are enabled in /boot/uEnv.txt

Please replace everything in /boot/uEnv.txt with this:
uname_r=4.4.68-ti-r108
cmdline=coherent_pool=1M net.ifnames=0 quiet cape_universal=enable

drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Re: Still issue with PWM on Ubuntu 16.04.2 TLS

by drewfustini on Tue Jul 11, 2017 11:52 pm

Here are my results with the Ubuntu image:
root@arm:~# uname -a
Linux arm 4.4.68-ti-r108 #1 SMP Fri Jun 9 18:52:39 UTC 2017 armv7l armv7l armv7l GNU/Linux

root@arm:~# 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,cape-universal

root@arm:~# cat /boot/uEnv.txt
uname_r=4.4.68-ti-r108
cmdline=coherent_pool=1M net.ifnames=0 quiet cape_universal=enable

root@arm:~# cat /etc/dogtag
rcn-ee.net console Ubuntu Image 2017-06-12

drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Re: Still issue with PWM on Ubuntu 16.04.2 TLS

by drewfustini on Tue Jul 11, 2017 11:59 pm

Here is how I installed the latest Adafruit_BBIO on that Ubuntu image:

sudo su -

pip install pytest
pip install --upgrade pip

apt-get install build-essential python-dev python-pip -y
apt-get update

git clone https://github.com/adafruit/adafruit-be ... -io-python
cd adafruit-beaglebone-io-python/
make install
pytest


All the tests complete OK:

root@arm:~/adafruit-beaglebone-io-python# pytest
============================= test session starts ==============================
platform linux2 -- Python 2.7.12, pytest-3.1.3, py-1.4.34, pluggy-0.4.0
rootdir: /root/adafruit-beaglebone-io-python, inifile:
collected 58 items

test/test_adc.py ......
test/test_gpio_input.py ..
test/test_gpio_output.py ......
test/test_gpio_setup.py ..........
test/test_led.py ..
test/test_pwm_setup.py ...........................
test/test_spi.py ..
test/test_uart.py ...

========================== 58 passed in 8.09 seconds ===========================

drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Re: Still issue with PWM on Ubuntu 16.04.2 TLS

by drewfustini on Wed Jul 12, 2017 12:15 am

Here is example of running a PWM test:

root@arm:~# cat pwm-test.py
import Adafruit_BBIO.PWM as PWM

PWM.start("P9_14", 50)
PWM.set_duty_cycle("P9_14", 25.5)
PWM.set_frequency("P9_14", 10)
PWM.stop("P9_14")
PWM.cleanup()

PWM.start("P9_14", 50, 2000, 1)
root@arm:~# sudo python pwm-test.py
root@arm:~#

drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Re: Still issue with PWM on Ubuntu 16.04.2 TLS

by henkwitte59 on Wed Jul 12, 2017 9:53 am

Hi,

I tested this on a fresh image and you are right: it works. Unfortunately I cannot get it to work on my current "production" image, so this probably means I have to start building that from scratch.

I chaged the uEnv file as you specified, also had to do that on the fresh image, but for the production image that did not do the trick.

Thanks for the effort! I will now start rebuilding all the other required packages and configurations into the new image.

henkwitte59
 
Posts: 20
Joined: Mon Sep 05, 2016 2:33 pm

Please be positive and constructive with your questions and comments.