OPWMB_PWM_FREQ_ISSUE

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

OPWMB_PWM_FREQ_ISSUE

418 次查看
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 回复数

392 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

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

0 项奖励
回复

398 次查看
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 项奖励
回复