PWM on dragonboard

Hi team,

I have some problems using the libmraa library for pwm(I want to control my led), when a run my script it says that the pwm is not initialized correctly.

As I was searching for a solution, I learned that only the Pin 28 MPP4 in the LS header is capable of producing the PWM output.

This is the code I used:
import mraa
import time

initialise PWM

x = mraa.Pwm(28)

set PWM period

x.period_us(700)

enable PWM

x.enable(True)

value= 0.0

while True:
# write PWM value
x.write(value)

time.sleep(0.05)

value = value + 0.01
if value >= 1:
    value = 0.0

I am using the latest version of debian, retrieved from https://www.96boards.org/documentation/consumer/dragonboard/dragonboard410c/downloads/debian.md.html

I am looking forward for a response.
Thanks.

Hi @tarmac,

Sadly, PWM is not supported for Dragonboard410c in MRAA currently. But, I’ll add it in couple of days since you’ve requested. Essentially, we would need to set up the pin capabilities and chip/pin info in board file.

Thanks,
Mani