Using the QN9090's PWM function to ring the buzzer

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Using the QN9090's PWM function to ring the buzzer

ソリューションへジャンプ
2,610件の閲覧回数
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 件の賞賛
返信
1 解決策
2,531件の閲覧回数
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.

元の投稿で解決策を見る

タグ(1)
0 件の賞賛
返信
5 返答(返信)
2,580件の閲覧回数
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.

タグ(1)
0 件の賞賛
返信
2,546件の閲覧回数
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 件の賞賛
返信
2,533件の閲覧回数
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.

タグ(1)
0 件の賞賛
返信
2,532件の閲覧回数
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.

タグ(1)
0 件の賞賛
返信
2,532件の閲覧回数
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.

タグ(1)
0 件の賞賛
返信
%3CLINGO-SUB%20id%3D%22lingo-sub-1910864%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EQN9090%E3%81%AEPWM%E6%A9%9F%E8%83%BD%E3%82%92%E4%BD%BF%E3%81%A3%E3%81%A6%E3%83%96%E3%82%B6%E3%83%BC%E3%82%92%E9%B3%B4%E3%82%89%E3%81%97%E3%81%BE%E3%81%99%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1910864%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF%E3%80%81%3C%2FP%3E%3CP%3EQN9090%E3%81%AEPWM%E6%A9%9F%E8%83%BD%E3%82%92%E4%BD%BF%E3%81%A3%E3%81%A6%E3%83%96%E3%82%B6%E3%83%BC%E3%82%92%E9%B3%B4%E3%82%89%E3%81%97%E3%81%9F%E3%81%84%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3EPWM%E5%91%A8%E6%B3%A2%E6%95%B0%E3%81%AF%20%22%20pwm_setup_t%20%22%20%E3%81%AE%20%22%20fsl_pwm.h%20%22%20%E3%81%8B%E3%82%89%E8%A8%AD%E5%AE%9A%E3%81%A7%E3%81%8D%E3%82%8B%E3%81%A8%E6%80%9D%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%E3%81%97%E3%81%8B%E3%81%97%E3%80%81%22%20prescaler_val%20%22%E3%80%81%22%20period_val%20%22%E3%80%81%22%20comp_val%20%22%20%E3%81%8CPWM%E3%81%AB%E3%81%A9%E3%81%AE%E3%82%88%E3%81%86%E3%81%AB%E5%BD%B1%E9%9F%BF%E3%81%99%E3%82%8B%E3%81%8B%E3%81%AF%E3%82%8F%E3%81%8B%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%E3%81%93%E3%82%8C%E3%82%893%E3%81%A4%E3%81%AE%E5%80%A4%E3%81%8B%E3%82%89PWM%E5%91%A8%E6%B3%A2%E6%95%B0%E3%82%92%E8%A8%88%E7%AE%97%E3%81%99%E3%82%8B%E5%BC%8F%E3%81%8C%E3%81%82%E3%82%8B%E3%81%8B%E3%81%A9%E3%81%86%E3%81%8B%E6%95%99%E3%81%88%E3%81%A6%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84%E3%80%82%3C%2FP%3E%3CP%3E%E3%82%88%E3%82%8D%E3%81%97%E3%81%8F%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E