falsh during pwm init on 9S08AC60

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

falsh during pwm init on 9S08AC60

1,195 次查看
Lj_cyril
Contributor I

Hello evry body,

 

 

I have a trouble during the initialization phase of the timer

to generate PWM :

 

here is my code

 

  //start up Timer 1
  TPM1MOD=MAX_VALUE_PWM-2;
  TPM1SC=0x08;
 
  //startup timer channel 
  TPM1C0V=MAX_VALUE_PWM;
  TPM1C2V=MAX_VALUE_PWM;
  TPM1C3V=MAX_VALUE_PWM;

  TPM1C0SC=0x24; 
  TPM1C2SC=0x24;
  TPM1C3SC=0x24;

 

My probleme is that after this code i have one period at low level

even if i put 0 or max to TPM1CxV registers.

 

If you have any idea ...

 

Thanks for your help

 

Best regards

 

Paul

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

532 次查看
giacomopetrini
Contributor IV

Hi,

 

I don't have the datasheet here, but for sure

 

 TPM1MOD has to be greater or equal than TPM1CxV.

 

Hope this help

 

Bye Jack

0 项奖励
回复

532 次查看
Quimney
Contributor III

Did you find it? I am having the same problem

0 项奖励
回复