falsh during pwm init on 9S08AC60

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

falsh during pwm init on 9S08AC60

1,198 Views
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

Labels (1)
0 Kudos
Reply
2 Replies

535 Views
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 Kudos
Reply

535 Views
Quimney
Contributor III

Did you find it? I am having the same problem

0 Kudos
Reply