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
已解决! 转到解答。
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
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