Interfacing servo motor on BeagleBone black

Load device tree overlay of PWM

Refer the following link for more knowledge about device tree overlay
http://oroboto.net/2014/03/29/beaglebone-pwm-motor-control/

it lists loaded overlays.

cat /sys/devices/bone_capemgr.8/slots

The bone_capemgr.? is bone_capemgr.8 for my BeagleBoneBlack with Angstrom Linux.It may be different for others.

load these overlays

echo am33xx_pwm > /sys/devices/bone_capemgr.?/slots
echo bone_pwm_P9_16 > /sys/devices/bone_capemgr.?/slots

It creates a pwm_test_P9_16.14 folder in /sys/devices/ocp.2/

cd /sys/devices/ocp.2/pwm_test_P9_16.14
echo 0 > run
echo 0 > polarity
echo 20000000 > period
echo 600000 > duty
echo 1 > run
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s