Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

[Linux] PWM problems

154

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
154

【Linux】 PWM problems

Posted at 5/12/2023 22:32:00      View:752 | Replies:1        Print      Only Author   [Copy Link] 1#
  • Type: Self-Compiled Firmware
  • SDK Package Name: rk356x_linux_release_v1.3.0b_20221213
  • Last Commit: 0000-00-00 00:00:00
  • Modification Content: LVDS with PWM configuration
  • Log: no log.zip
Problem description and steps to reproduce:
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>;






no log.zip

22 Bytes, Down times: 0

Reply

Use props Report

486

Credits

20

Prestige

15

Contribution

intermediate

Rank: 3Rank: 3

Credits
486
Posted at 5/15/2023 17:45:54        Only Author  2#
The 50000 is means 50000ns.
If you need to set the maximum clock frequency, please use 'echo 255 > /sys/class/backlight/backlight/brightness'.
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list