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.
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.
Hi, @Jose7
Sorry, forgot to ask your SDK example.
Which example did you import to your workspace?
I have downloaded QN9090's SDK, and trying to check your issue now.
Best regards,
Christine.
Hi, @Jose7
Thanks for your feedback.
I will check it and reply to you soon.
At the same time, would you mind to checkout to our latest release: SDK_
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
Thanks for creating case to us.
May I ask what is your SDK version and what IDE version are you using?
Are you using MCUXpresso? or other IDE?
Let's sync these basic information so that I can check the source code on my side for you.
Best regards,
Christine.