Using PP0 for PWM0 in 9S12ZVLA12MLF?

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

Using PP0 for PWM0 in 9S12ZVLA12MLF?

Jump to solution
740 Views
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 Solution
538 Views
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

View solution in original post

2 Replies
538 Views
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 Kudos
539 Views
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