androidthings / drivers-samples

Peripheral driver samples
Apache License 2.0
153 stars 57 forks source link

Servo sample for Android Things does not working with i.MX7D #18

Open shangyilim opened 5 years ago

shangyilim commented 5 years ago

Hi! I ran the pwmservo demo on NXP Pico i.MX7D Developer Kit and it did not work. I then ran the same demo on Raspberry Pi 3 B and it worked as instructed.

The only difference between both is just the wiring for PWM1 on i.MX7D vs PWM0 on the Raspberry Pi.

I also ranused the PIO CLI to figure out whether the PWM is working or not, and when i ran pio pwm PWM0 enable 1 --duty=12.5 --freq=50 on my Raspberry Pi 3 B, my servo managed to turn as instructed, but when I ran pio pwm PWM1 enable 1 --duty=12.5 --freq=50, on the i.MX7D, my servo did not turn.

Any clues?

Thanks!