OPWMB_PWM_FREQ_ISSUE

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

OPWMB_PWM_FREQ_ISSUE

218件の閲覧回数
ESAKKI_MBD
Contributor II

HELLO EVERYONE,

I'm testing the PWM using EMIOS and I facing some doubts:

Informations:

CLK is 160MHz.

and for pwm frequency calculation i used 

PWM peripheral clock = CORE_CLK/ Core_clk_divider/ Global_prescaler/ Clock_prescaler

but my required output is getting wrong. after i research in nxp community i got two different formulas,

1. PWM frequency = CORE_CLK / global prescaler / internal prescaler / (period [ticks] x 2)
Period[ticks] = CORE_CLK / PERIOD_FREQ / 2

 

2. PWM frequency = CORE_CLK / global prescaler / internal prescaler / (B1+1)

 

which one is correct formula for calculation of frequency and duty cycle.

@VaneB  @Robin_Shen @Irina_Costachescu 

Thanks in advance.

ES

タグ(3)
0 件の賞賛
2 返答(返信)

192件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Please refer to the discussion in https://community.nxp.com/t5/S32K/PWM-issue/m-p/1763225

0 件の賞賛

198件の閲覧回数
Irina_Costachescu
NXP Employee
NXP Employee

Hi @ESAKKI_MBD

Could you please check the following article posted on our community (link)?

It provides all the necessary information on how to configure and use the PWM component in MBDT applications (Section 4. PWM Configuration). It also includes the explained formulas for computing the Frequency and Period of generated PWM signals, inside Section 4.4 MCL. However, I would recommend going through the entire article for more details on PWM Peripheral, Pins, Clocks and Interrupts configuration.

Please let us know if this helps or if any additional information/guidance is needed from our side.

Thanks,

Irina

0 件の賞賛