AnsweredAssumed Answered

PWM output

Question asked by Kang Liat Keng on Jan 18, 2014

I am using MC9S08GT16ACFDE ( QFN-48 )

 

was trying to configure pin #20 ( TPM1CH0 ) as a PWM output ( variable duty ).

please advice how can I configure the MCU to do so ?

 

my initialization is below :

 

TPM1SC_TOIC = 1;

TPM1SC_CPWMS = 0;

TPM1SC_CLKSB = 1;

 

TPM1_C0SC_CH0F =  1;

TPM1_C0SC_MS0B =  1;

TPM1_C0SC_ELS0B =  1;

 

TPM1C1V = 0x0064;

TPM1MOD = 0x03E8;

 

something is wrong... I am not getting anything at pin #20... why ?

Outcomes