Random PWM generation

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

Random PWM generation

542 Views
oakie_doke
Contributor III

Hi,

I use Code Warrior 10.6 with Processor Expert and MCF51MM256CLK mcu. I use TimerInt component to measure 10ms impulse on some pin and after this time in interrupt i want to generate one period of pwm on another pin. I use PWM component with setted 20ms period, 19ms starting pulse width and low initial polarity. Problem is on scope I see that time between impulses is random, not 19ms, almost always is shorter. I think here is problem with pwm. Could you propose some solution of this problem?

0 Kudos
Reply
1 Reply

406 Views
marek_neuzil
NXP Employee
NXP Employee

Hello Sebastian,

Could you provide me the project you are using, please? There are many possibilities how to cerate the application. The TimerInt and PWM support several devices that can be used for the application. Please, provide the description of the configuration at least.

There can be also problem of unstable clock source (e.g. unadjusted internal oscillator). Do you use external crystal as clock source for the PWM device?

Best Regards,

Marek Neuzil

0 Kudos
Reply