Using PP0 for PWM0 in 9S12ZVLA12MLF?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Using PP0 for PWM0 in 9S12ZVLA12MLF?

ソリューションへジャンプ
1,498件の閲覧回数
ptszymanski
Contributor II

I am attempting to use 6 of the 8 PWM outputs as 8-bit PWM on the 9S12ZVLA12MLF.  I am also using CodeWarrior 10.7 and using Processor Expert to set up the channels.  I cannot get PP0 to work for PWM0 nor PP2 to work for PWM2.  I have also tried manipulating the PWM registers directly, but cannot get a response on those pins.  Are those pins available for use as PWM?  

1 解決策
1,296件の閲覧回数
dianabatrlova
NXP TechSupport
NXP TechSupport

Hi Peter,

Yes, you can use those pins for PWM.

For the S12ZVLA128 MCU, there are two PWM modules PWM0 and PWM1 available.  You can see channel mapping in the reference manual Figure 1-8.:

pastedImage_2.png

According to the figure above you need to set PWM1 module and channel 1 for uses PWM for PP0 pin.

We have example code for the S12ZVL32 MCU. The S12ZVL32 has only one PWM module. However, it could be useful for inspiration.PWM example code for S12ZVL  

I hope it helps you.

Best regards,

Diana

元の投稿で解決策を見る

2 返答(返信)
1,296件の閲覧回数
ptszymanski
Contributor II

Hi Diana,

Thank you for the reply.  I wasn't aware that they were separated like that, control-wise.  Thank you for the diagram and the figure reference, that was invaluable. I missed that the mapping is different from the 32/16/8 variants to the 128/96/64 variants.

Regards,

Peter

0 件の賞賛
返信
1,297件の閲覧回数
dianabatrlova
NXP TechSupport
NXP TechSupport

Hi Peter,

Yes, you can use those pins for PWM.

For the S12ZVLA128 MCU, there are two PWM modules PWM0 and PWM1 available.  You can see channel mapping in the reference manual Figure 1-8.:

pastedImage_2.png

According to the figure above you need to set PWM1 module and channel 1 for uses PWM for PP0 pin.

We have example code for the S12ZVL32 MCU. The S12ZVL32 has only one PWM module. However, it could be useful for inspiration.PWM example code for S12ZVL  

I hope it helps you.

Best regards,

Diana