Thanks for that, I’ll look at it again today.  I may have mucked something up 
while digging into the /sys/class/pwm file structure or forgotten to do 
GPIO.cleanup() or some other combination of things.

-Steve

> On Jan 15, 2021, at 9:33 AM, randy cooper <[email protected]> wrote:
> 
> P8_13 is working for me as a PWM output, and I am using the Adafruit BBIO 
> library.   I’m using the latest image with LXQT (Debian 9.9 I believe).
> Randy
> 
> On Thursday, January 14, 2021 at 8:28:34 PM UTC-6 [email protected] wrote:
> OK, I rechecked and only Pin 8_13 is not working; the other three PWM pins 
> are good using Adafruit.PWM.  Pin 8_13 does respond to GPIO.HIGH and 
> GPIO.LOW, so I don’t think I’ve damaged the hardware.  Who knows what I have 
> managed to do to the /sys/class files.  If it doesn’t clear up on restart, I 
> will reinstall the image.  Of course 8_13 is the one I was planning to use, 
> but I can just as well wire something to 8_19 for now.
> 
> Thanks for the help.
> 
> -Steve
>   
> 
> 
>> On Jan 14, 2021, at 8:00 PM, jonnymo <[email protected] 
>> <applewebdata://5152E561-8F63-4F84-88F4-73E6DF055C52>> wrote:
>> 
> 
>> The SpreadSheet at the following link will show you which pins on the BB 
>> Black can be set for PWM.
>> 
>> https://docs.google.com/spreadsheets/d/1fE-AsDZvJ-bBwzNBj1_sPDrutvEvsmARqFwvbw_HkrE/edit#gid=1518010293
>>  
>> <https://docs.google.com/spreadsheets/d/1fE-AsDZvJ-bBwzNBj1_sPDrutvEvsmARqFwvbw_HkrE/edit#gid=1518010293>
>> 
>> As far as the Adafruit BBIO libs, have you gone through the example at the 
>> Adafruit site?
>> https://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/pwm
>>  
>> <https://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/pwm>
>> 
>> If this is not working, could you provide any errors or output of the issue 
>> you are seeing?
>> 
>> The output of the following might be helpful:
>>    /opt/scripts/tools/version.sh  
>> 
>> Cheers,
>> 
>> Jon
>>  
>> 
>> On Thu, Jan 14, 2021 at 4:42 PM Steve Lentz <[email protected] 
>> <applewebdata://5152E561-8F63-4F84-88F4-73E6DF055C52>> wrote:
>> Black.  BeagleBoard.org <http://beagleboard.org/> Debian Buster IoT Image 
>> 2020-04-06.
>> 
>> FWIW, the Adafruit libraries let me control the pins as GPIO.
>> 
>> 
>> TY,
>> -Steve
>> 
>>> On Jan 14, 2021, at 7:02 PM, jonnymo <[email protected] 
>>> <applewebdata://5152E561-8F63-4F84-88F4-73E6DF055C52>> wrote:
>>> 
>>> Which BeagleBoard are you using?
>>> 
>>> Jon
>>> 
>>> On Thu, Jan 14, 2021 at 2:51 PM [email protected] 
>>> <applewebdata://5152E561-8F63-4F84-88F4-73E6DF055C52> <[email protected] 
>>> <applewebdata://5152E561-8F63-4F84-88F4-73E6DF055C52>> wrote:
>>> OK, I want to generate a PWM signal to send to a motor controller.  This is 
>>> simply to communicate the desired speed, the motor controller will do all 
>>> the heavy lifting.  
>>> 
>>> Unfortunately, the Adafruit_BBIO libraries appear broken and bonescript 
>>> doesn't seem any better.
>>> 
>>> After digging through Google results I found myself in /sys/class/pwm/ 
>>> using echo to write values into various files and through pure dumb luck 
>>> was able to get a 2 Khz square wave up on a scope and change its duty 
>>> cycle.  So at least my set up seems to be working at some level.  
>>> 
>>> However, I feel I am missing a bunch of information. Which pwmchip exports 
>>> to which pwm-X:X and corresponds to which pin?  "duty_cycle" is not really 
>>> duty cycle, it is nanoseconds high.  I can't change the period, even to 
>>> sensible values like 250000 or 1000000.  Some of the information on Stack 
>>> Exchange is worrying, will pwm-4:0 always correspond to P9_14 or can this 
>>> change on boot?   
>>> 
>>> Is there a way to restore the functionality of the Adafruit BBIO libraries, 
>>> short of waiting for an update?  I did pip3 install -U.  Requirement 
>>> already satisfied: Adafruit_BBIO in /usr/local/lib/python3.7/dist-packages 
>>> (1.2.0)
>>> 
>>> If that's not possible, is there any documentation on how the 
>>> /sys/class/pwm is intended to function?
>>> 
>>> Thank you,
>>> -Steve Lentz
>>> 
>>> -- 
>>> For more options, visit http://beagleboard.org/discuss 
>>> <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] 
>>> <applewebdata://5152E561-8F63-4F84-88F4-73E6DF055C52>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/beagleboard/08130fba-0f75-464a-9041-d66a1c3a8cacn%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/beagleboard/08130fba-0f75-464a-9041-d66a1c3a8cacn%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>> 
>>> -- 
>>> For more options, visit http://beagleboard.org/discuss 
>>> <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] 
>>> <applewebdata://5152E561-8F63-4F84-88F4-73E6DF055C52>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/beagleboard/CAG99bkoUYXmrUU%2BwtoQnXTYAd3Uq6SAXsTFskbZ-75%2ByvAX3eQ%40mail.gmail.com
>>>  
>>> <https://groups.google.com/d/msgid/beagleboard/CAG99bkoUYXmrUU%2BwtoQnXTYAd3Uq6SAXsTFskbZ-75%2ByvAX3eQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>> 
>> 
>> -- 
>> For more options, visit http://beagleboard.org/discuss 
>> <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] 
>> <applewebdata://5152E561-8F63-4F84-88F4-73E6DF055C52>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/beagleboard/44AF4518-7FEA-4331-9E61-5D442D484D20%40gmail.com
>>  
>> <https://groups.google.com/d/msgid/beagleboard/44AF4518-7FEA-4331-9E61-5D442D484D20%40gmail.com?utm_medium=email&utm_source=footer>.
>> 
>> -- 
>> For more options, visit http://beagleboard.org/discuss 
>> <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] 
>> <applewebdata://5152E561-8F63-4F84-88F4-73E6DF055C52>.
> 
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/beagleboard/CAG99bkr3Uo18Mx57p-m2ec2bfi0A%2BKjYMJYNb-bd5sMfKNpRzg%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/beagleboard/CAG99bkr3Uo18Mx57p-m2ec2bfi0A%2BKjYMJYNb-bd5sMfKNpRzg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> 
> 
> -- 
> For more options, visit http://beagleboard.org/discuss 
> <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] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/beagleboard/8d4b5048-1469-4557-bafa-1c8680aa39b1n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/beagleboard/8d4b5048-1469-4557-bafa-1c8680aa39b1n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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/42598AFE-34E2-4CB0-8B57-1ACE3E46A7B9%40gmail.com.

Reply via email to