Firefly Open Source Community

Title: PWM problems [Print This Page]

Author: Maverick_by_    Time: 5/12/2023 22:32
Title: PWM problems
I have a custom board based on RK3568jq.
I made Linux minimal image using Yocto:
https://wiki.t-firefly.com/en/Fi ... e/manual_yocto.html
I added PWM control and it works fine using next command:echo 100 > /sys/class/backlight/backlight/brightness


but as i can see using oscilloscope , the frequency of PWM signal is about 40 seconds instead of 20 kHz !



my dtsi-file modifications:
rk3568-firefly-roc-pc.dtsi


backlight:backlight {
        status = "okay";        
        compatible = "pwm-backlight";
        pwms = <&pwm4 0 50000 0>;
...
}

lvds_panel: lvds-panel {
        compatible = "simple-panel";
        status = "okay";
        backlight = <&backlight>;
.....
}


what im doing wrong about frequency?
The third paramenter 50000 is frequency in nanoseconds ?

pwms = <&pwm4 0 50000 0>;






tchip_askquestions

no log.zip

22 Bytes, Down times: 0


Author: ʱ¼äµÄºûµû    Time: 5/15/2023 17:45
The 50000 is means 50000ns.
If you need to set the maximum clock frequency, please use 'echo 255 > /sys/class/backlight/backlight/brightness'.




Welcome Firefly Open Source Community (https://bbs.t-firefly.com/) Powered by Discuz! X3.1