Hello.
I want to use the QN9090's PWM function to make a buzzer sound.
I believe the PWM frequency can be set from "pwm_setup_t" in "fsl_pwm.h".
However, I don't know how "prescaler_val", "period_val", and "comp_val" affect the PWM. Please let me know if there is a formula for calculating the PWM frequency from these three values.
Kind regards.
Solved! Go to Solution.
Hi, @Jose7
Hope below information is helpful for you:
18.6.1 Prescaler
There are eleven 10-bit prescalers. The frequency of the scaled clock enable is calculated
as follows.
Fscaled = Fclk / (pscl +1)
Where Fclk is the frequency of the AHB clock, pscl is the prescaler setting for the PWM
channel.
And also we have QN9090's User Manual in below link, you can find more details in Chapter 18: Pulse Width Modulation (PWM).
Please let me know whether you have any other concerns on this thread. If no, please do not hesitate to mark this reply as a solution.
Best regards,
Christine.
Hello.
Thank you for your reply.
I will state the version of the SDK and IDE I am using.
SDK : SDK_2_6_4_QN9090DK6
IDE : MCUXpresso IDE v11.8.0
Kind regard.
Hi, @Jose7
Hope below information is helpful for you:
18.6.1 Prescaler
There are eleven 10-bit prescalers. The frequency of the scaled clock enable is calculated
as follows.
Fscaled = Fclk / (pscl +1)
Where Fclk is the frequency of the AHB clock, pscl is the prescaler setting for the PWM
channel.
And also we have QN9090's User Manual in below link, you can find more details in Chapter 18: Pulse Width Modulation (PWM).
Please let me know whether you have any other concerns on this thread. If no, please do not hesitate to mark this reply as a solution.
Best regards,
Christine.