S12G PWM first waveform

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

S12G PWM first waveform

368 Views
jinjingyang
NXP Employee
NXP Employee

Dear Sir,

According to datasheet of S12G PWM section, "The first PWM cycle after enabling the channel can be irregular."

Do we have workaround  to generate a good waveform for the first PWM pulse?

Write PWM CNT register before enable the PWM?

Regards,

Jason Yang

0 Kudos
1 Reply

251 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

The irregularity is caused by synchronization of the PWM module and the output. The PWM starts immediately but its waveform is not available on the associated output until its clock source begins its next cycle. I think there is nothing we could do with it.

 

Any write to the PWM CNT register only causes the counter to reset to 0. Since the counter is set to 0 after reset, there is no need to write to the register unless you want to re-enable the PWM and clear its previous state.

 

Regards

Daniel

0 Kudos