Pwm period and dutycycle

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

Pwm period and dutycycle

ソリューションへジャンプ
921件の閲覧回数
HBH
Contributor II

Hi

I was working on NXP s32k324 controller .

Need to run a PWM at 100Hz and 125Hz .

I am using core clock 160mhz as input to pwm, and emios_ch_prescala is configured to emios_pwm_ip_clock_div_16.how to achieve this? If we configure EMIOS_PWM_IP_PS_SRC_PRESCALED_CLOCK as prescalar source where to give global prescalar? Is it emios_ch_prescalar alternative? 

Period In Ticks: Valid range: [0, 65534]

1 解決策
893件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

global prescaler is defined in MCL component, see below pictures for LLD and HLD drivers in S32DS ConfigTool

PetrS_0-1688470090021.pngPetrS_1-1688470105289.png

BR, Petr

元の投稿で解決策を見る

3 返答(返信)
894件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

global prescaler is defined in MCL component, see below pictures for LLD and HLD drivers in S32DS ConfigTool

PetrS_0-1688470090021.pngPetrS_1-1688470105289.png

BR, Petr

863件の閲覧回数
HBH
Contributor II

using EmiosChMode as EMIOS_PWM_IP_MODE_OPWFMB since we have to get variable period and variable duty and EmiosChCounterBus as EMIOS_PWM_IP_BUS_INTERNAL.
while configuring EmiosChPrescalerSource as EmiosChPrescalerSource and PwmEmiosBusRef as /Mcl/Mcl/MclConfig/EmiosCommon_0/EmiosMclMasterBus and in mcl EmiosMclClkDivVal is configured as 2, getting error as "When using EMIOS_PWM_IP_BUS_INTERNAL, PwmEmiosBusRef is not needed"

  • should we needed to select PwmEmiosBusRef as /Mcl/Mcl/MclConfig/EmiosCommon_0/EmiosMclMasterBus inorder to achieve 100hz?
  • what all configuration is needed to achieve 100hz?
832件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

so remove PwmEmiosBusRef from channel config and take EmiosMclClkDivVal as global prescaler in calculation.

BR, Petr

 

0 件の賞賛
返信