Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

[Linux] PWM

154

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
154

【Linux】 PWM

Posted at 10/25/2022 22:08:53      View:3043 | Replies:1        Print      Only Author   [Copy Link] 1#
  • Type: Official Firmware
  • Filename: ---
  • Download Address: -
  • Log: no log.zip
Problem description and steps to reproduce:
Last edited by Maverick_by_ In 10/26/2022 13:34 Editor

I try to use PWM, using this link:
https://wiki.t-firefly.com/en/iCore-3568JQ/driver_pwm.html
1) There is NO kernel/arch/arm64/boot/dts/rockchip/rk3399-firefly-demo.dtsi in my /rockchip/ folder.
And i can't add the PWM DTS configuration in the DTS source file
pwm_demo: pwm_demo {
        status = "disabled";
        compatible = "firefly,rk356x-pwm";
        pwms = <&pwm1 0 10000 1>;   //pwm1WM number   0 10000WM period in nanoseconds  1:polarity
        duty_ns = <5000>;   //pwm duty cycle activation time, unit ns
    };
Is documentation wrong?
2) I don't understand what to do with this C++ code:
struct pwm_device * pwm1 = NULL;pwm0 = pwm_request(1, “firefly-pwm”);pwm_config(pwm0, 500000, 1000000);pwm_enable(pwm0);

This is kernel driver source code, necessary to rebuild kernel and write firmware to SOM, why should i change it ? I need to change PWM parameters dinamically.How can i control it ?

no log.zip

22 Bytes, Down times: 0

Reply

Use props Report

129

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
129
Posted at before yesterday 07:44        Only Author  2#
Thank you for sharing; the article is truly stunning! Upgrade your IT skills with free Pass CDPSE test guide. Wishing you good luck in your exams!
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