Enable & set PWM output on boot

  • Which is the best strategy to enable PWM on boot?

    My aims is to enable & set the pwm to a preconfigured duty cycle as soon as possible during the boot process.

    I'v digged into buildroot but can't figure out how to do that.


    Currently I'm building using an out-of-tree project structure, so that any project specific configuration would be isolated from the F&S's provided buildroot tree.


    Thanks,

    Michele

  • Hello Michele,


    you can have a look at the linux backlight pwm driver


    drivers/video/backlight/pwm_bl.c


    it uses a pwm and configures it pretty early in the boot process to a default value, configured in the device tree.


    Maybe you could derive a driver, that does something similar for a normal pwm.



    Best Regards


    Your F&S Support Team