Using PP0 for PWM0 in 9S12ZVLA12MLF?

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

Using PP0 for PWM0 in 9S12ZVLA12MLF?

跳至解决方案
1,504 次查看
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,302 次查看
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,302 次查看
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,303 次查看
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