Hi. I read all previous discussions but i have not found any clear instruction how to make PWM works.
Here is my steps:
Configure 40-pin expansion header
- Check “pwm0 (32)” and “pwm2 (33)” enabled.
echo 0 > /sys/class/pwm/pwmchip0/export
echo 50000 > /sys/class/pwm/pwmchip0/pwm0/period
echo 25000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable
- Connect oscilloscope to PIN32 and GND
Expected: Oscilloscope shows 50 KHz signal, 50% DC
Actual: Oscilloscope shows random noise
I am 100% sure that oscilloscope is working and displaying correct results.
Is it wrong steps? Or a bug?