PWM questions

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

PWM questions

1,020件の閲覧回数
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 返信

869件の閲覧回数
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.