Low frequency PWM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Low frequency PWM

Jump to solution
984 Views
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 Kudos
Reply
1 Solution
980 Views
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

View solution in original post

2 Replies
981 Views
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

964 Views
Bobkat
Contributor II

Hi Petr,

 

Thanks for information, worked a treat!

 

Best regards

 

Rob

0 Kudos
Reply