PWM questions

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

PWM questions

664 Views
carlosomarharoc
Contributor II

Hello

 

I need help to undestand something about the PWM with TPM.

 

I have configured my TMP and have a PWM working  in TPM Channel  but I need put the PWM in differents  ports of MCU.

 

I try with this: led3=TPM2C0SC_CH0F;

 

If anyone can help, it would be appreciated.

 

I'm working with AC60  S08 Family

Labels (1)
Tags (2)
0 Kudos
Reply
1 Reply

513 Views
Rick_Li
NXP Employee
NXP Employee

Hi Carlos,

You can not give TPM2COSC_CH0F to led3 directly since they are different data type (suppose led3 is connected to on port pin).

I would suggest using a judge statement like below:

if(TPM2COSC_CH0F){

     led3 = 1;
     ...}

or, you can do it in the interrupt routine.