S12G PWM first waveform

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

S12G PWM first waveform

691 次查看
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 项奖励
回复
1 回复

574 次查看
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 项奖励
回复