please share the crrent rate of pwmN (in Hz), $ cat /sys/kernel/debug/bpmp/debug/clk/pwmN/rate
could you please also check all possible clock parents,
for example, pwmN, $ cat /sys/kernel/debug/bpmp/debug/clk/pwmN/possible_parents
please share the crrent rate of pwmN (in Hz), $ cat /sys/kernel/debug/bpmp/debug/clk/pwmN/rate
could you please also check all possible clock parents,
for example, pwmN, $ cat /sys/kernel/debug/bpmp/debug/clk/pwmN/possible_parents
please check this on Nano series, $ cat /sys/kernel/debug/clk/pwm/clk_possible_parents
you may also examine the clk_rate to check the possible rate for the PWM controller.
please note that PWM has to be divide by 256 for its max rate,
thanks
please refer to below,
you may check all possible clock parents of pwmN. $ cat /sys/kernel/debug/bpmp/debug/clk/pwmN/possible_parents
and, setting a new source from those possible sources $ echo <new_source> > /sys/kernel/debug/bpmp/debug/clk/pwmN/parent
But there was nothing I wanted to achieve.
I want to control one PWM pulse by dividing it into 2048.
I want to achieve a minimum high time of 5 μs for one pulse with a period of 10.24 ms.
I read the technical reference manual, but can one pulse only be divided into 256?
here’s formula to calculate the possible rate of a PWM controller, Max Rate = clock Mhz/ 256 Min Rate = clock Mhz/ (256* 2^13) (i.e. 13-bits Frequency divider (bits 0:12))
you should check whether the configurations is within the range,
if yes, period setting is in terms of nanoseconds. so frequency should be provided after Hz to ns conversion,
i.e. period = (1/rate)*10^9; duty cycle is the percentage of the period.
Thanks for the information.
When applied to this calculation, it becomes as follows.
Max Rate = clock Mhz/ 256 = 48MHz / 256 = 187.5kHz
period = (1/rate)*10^9 = (1/187.5k)*10^9 = 5333(ns)
In this case, do you recognize that the following conditions will not be realized because the period obtained by multiplying the duty cycle is out of range?
the device clock maximum speed is 48MHz, and it’s necessary to have it divide by 256 to generate the PWM output frequency. you may access TRM to obtain the details.
so, that’s not supported.