Using the QN9090's PWM function to ring the buzzer

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using the QN9090's PWM function to ring the buzzer

Jump to solution
591 Views
Jose7
Contributor I

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.

0 Kudos
Reply
1 Solution
512 Views
Christine_Li
NXP TechSupport
NXP TechSupport

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.
F
scaled = Fclk / (pscl +1)
Where F
clk 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).

QN9090(T)/QN9030(T) User Manual

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.

View solution in original post

Tags (1)
0 Kudos
Reply
5 Replies
561 Views
Christine_Li
NXP TechSupport
NXP TechSupport

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.

Tags (1)
0 Kudos
Reply
527 Views
Jose7
Contributor I

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.

0 Kudos
Reply
514 Views
Christine_Li
NXP TechSupport
NXP TechSupport

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_2.6.14_QN9090DK6?

 

Best regards,

Christine.

Tags (1)
0 Kudos
Reply
513 Views
Christine_Li
NXP TechSupport
NXP TechSupport

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.

Tags (1)
0 Kudos
Reply
513 Views
Christine_Li
NXP TechSupport
NXP TechSupport

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.
F
scaled = Fclk / (pscl +1)
Where F
clk 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).

QN9090(T)/QN9030(T) User Manual

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.

Tags (1)
0 Kudos
Reply