MC68HC908GP32CP Changing output on TIM interrupt



Hey all,
I have a HC908GP32 chip that I want to use to generate two PWM signal
to drive two motors, and also generate a pulse signal for a LED. The
two PWM signal can be generated by TIM output compare, but since there
is only 2 output pins for the TIM1 on the CP package, TIM2 cannot be
config directly to generate the pulse for LED.

Therefore I have config TIM2CH0 to "software compare", and in the
interrupt generated, I toggle a selected output pin (say PTA_PTA3) by
the code:
PTA_PTA3 =~ PTA_PTA3;

However, when I measure the output on PTA3, there is nothing.

The chip is driven by an external 9.8304MHZ crystal.

Regards,

PQ

.