Hello,
I have the BeagleBone Black as well as the latest archlinuxarm distribution (kernel 3.8).
I now would like to control the pwm ports unfortunately this seems a bit difficult in comparison to controlling the gpios.
GPIO:
$this->bbcode_second_pass_code('', '$ echo 36 > /sys/class/gpio/export
$ cd /sys/class/gpio/gpio36
$ echo out > direction
$ echo 1 > value')
PWM:
$this->bbcode_second_pass_code('', '$ SLOTS=/sys/devices/bone_capemgr.*/slots
$ PINS=/sys/kernel/debug/pinctrl/44e10800.pinmux/pins
$ echo am33xx_pwm > $SLOTS
$ echo bone_pwm_P9_21 > $SLOTS
$ echo 1 > export
$ cd /sys/class/pwm/pwm1
$ echo 1000000 > period_ns')
Is there a way I could control PWM via sysfs without the strange stuff above? I would like to avoid having such a complicated export procedure as well as using hardcoded pin identifiers (bone_pwm_P9_21). Is there a way to export the PWMs as done with the GPIOs?
Best,
Bodo