Low frequency PWM

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

Low frequency PWM

跳至解决方案
985 次查看
Bobkat
Contributor II

Hi,

I'm using an MPC5748G mcu (DEVKIT) and am trying to get a PWM waveform between 100Hz and 200Hz.

Have looked at the  S32DS examples and the closest I can get using the pwm_pal type configuration is 1Khz. I can get down to approximately 500Hz if I use the  emios OPWFMB type configuration by playing around with the global and channel clock prescaler values..

Is it possible to get the desired frequency range? 

If the frequency range is possible to achieve, I would be most grateful if someone could point me in the right direction with regard to configuration settings etc.

 

Best regards

Rob

0 项奖励
回复
1 解答
981 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi, 

do not use pal driver, rather use emios_pwm driver directly and you will have more options to set output frequency. There is emios_pwm_mpc5748g demo example.

Generated frequency in OPWFMB mode is eMIOS_clk/(global prescaler)/(internal prescaler)/B_register.

eMIOS_CLK is FS80 (usually 80MHz), B_register is written with "Period Count" value set in emios component 

BR, Petr

在原帖中查看解决方案

2 回复数
982 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi, 

do not use pal driver, rather use emios_pwm driver directly and you will have more options to set output frequency. There is emios_pwm_mpc5748g demo example.

Generated frequency in OPWFMB mode is eMIOS_clk/(global prescaler)/(internal prescaler)/B_register.

eMIOS_CLK is FS80 (usually 80MHz), B_register is written with "Period Count" value set in emios component 

BR, Petr

965 次查看
Bobkat
Contributor II

Hi Petr,

 

Thanks for information, worked a treat!

 

Best regards

 

Rob

0 项奖励
回复