https://briancode.wordpress.com/2015/01/06/working-with-pwm-on-a-beaglebone-black/
The sysfs pathing is a little different than explained on that blog( changes in kernel 4.x ), but thats how PWM is supposed to work on the BBB. As for your error. It sounds as though the driver module is misconfigured somehow in ARCH. I would suggest using Debian, getting to know the system well, and then comparing with ARCH. Making sure whoever is responsible for that ARCH image actually did things right. On Mon, Aug 8, 2016 at 10:16 PM, evilwulfie <[email protected]> wrote: > most people here use debian. things just seem to work. ( thanks to Robert > nelson.) > try a debian image. > > > > On 8/8/2016 9:46 PM, [email protected] wrote: > > Hi, > > I am having trouble with BBB and using PWM. I am using Arch Linux and the > following kernel "4.7.0-1-ARCH #1 Wed Jul 27 19:22:21 MDT 2016 armv7l > GNU/Linux". > > When I try to enable PWM (echo "am33xx_pwm" > > /sys/devices/platform/bone_capemgr/slots) I get the following error in > kernel log: [ 72.786264] ehrpwm 48300200.pwm: Failed to get tbclk [ > 72.791291] ehrpwm: probe of 48300200.pwm failed with error -2 Any idea what > is wrong? Also, configuration of the PWM is very confusing. Can someone > please explain how to configure PWM? For example I would like to use P9_16 > as a PWM pin. What are the steps necessary to configure and use this pin as > PWM? I assume I have to also use this overlay [1] but it seems to binds it > to a "pwm_test" driver which does not exist in my kernel tree. However, > even without this driver it seems like just inserting the "am33xx_pwm" > overlay gives me option to "export" the pwm0 device: "echo 0 > > /sys/class/pwm/pwmchip0/export". This gives me a folder " > /sys/class/pwm/pwmchip0/pwm0/" that has nodes for duty_cycle, period, > polarity, and enable..... [1] "https://github.com/beagleboar > d/devicetree-source/blob/master/arch/arm/boot/dts/bone_pwm_P9_16-00A0.dts" > Thanks! > -- 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/98d065d0-7646-4b7c-bd9a-48029b100bb8%40googlegroups.com > <https://groups.google.com/d/msgid/beagleboard/98d065d0-7646-4b7c-bd9a-48029b100bb8%40googlegroups.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout. > > -- > 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/1102e4d8-8aea-ad00-f29d-46f876e9214b%40gmail.com > <https://groups.google.com/d/msgid/beagleboard/1102e4d8-8aea-ad00-f29d-46f876e9214b%40gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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/CALHSORom0L367E-n0%3DM-J_kPkW6stVKYbPP6BCgBi6po4nNy7Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
