PWM questions

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

PWM questions

1,022 次查看
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

标签 (1)
标记 (2)
0 项奖励
回复
1 回复

871 次查看
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.