Hello everyone,
I’m currently working with a BeagleBone Black (BBB) to control a servo motor using PWM on pin P9_14, but I’m not getting any response from the servo despite configuring everything according to standard setup procedures. I am using a custom Yocto Kirkstone image built with the “meta-ti” layer and a kernel checked out at branch v6.1.80-ti-r34. Here are the detailed steps I’ve taken and configuration I’ve tried:
1. Hardware Setup
- I connected the servo’s signal line to P9_14.
- The servo has been powered through P9_7 (
SYS_5V
) and P9_2 (DGND
) lines.
2. Software and Overlay Setup
- I created and loaded a custom Device Tree Overlay (DTSO) to enable PWM on pwmchip0 with the this configuration for
P9_14
.
3. Exporting and Configuring PWM Channel
For P9_14 (pwmchip0
, channel 0)
- Exported the PWM channel:
echo 0 > /sys/class/pwm/pwmchip0/export
- Set period and duty cycle for a 50Hz signal (20ms period):
echo 20000000 > /sys/class/pwm/pwmchip0/pwm0/period # 20ms
echo 1000000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle # 1ms
- Enabled the PWM:
echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable
4. Testing and Observations
- I tried gradually adjusting the duty cycle between 1ms and 2ms to test the servo range.
- Checked the system log with
dmesg | tail
, but there were no errors or warnings related to PWM. - Despite this, the servo did not move.
Request for Assistance
I suspect there may be an issue with my Device Tree Overlay or with how PWM is configured on my BBB. Could someone help verify if my overlay configuration is correct for enabling PWM on this pin? Additionally, if there are other steps or tools I could use to diagnose this issue, I would greatly appreciate any suggestions.
Thank you for your time and assistance!