Atxmega128a1 PWM port configuration code review and comment will be appreciated !
Drafted PWMInit() to configure PORTC pin[4|5|6|7] for PWM fan control but no wave form could be seen in the scope ?
void PWMInit( )
PORTC_DIRSET = 0xf0;//Pot C Fan Sense.
TCC0.CTRLB |= 0x13; //p164: Set Compare Channel B single slop waveform generation mode.
TCC0.PER = 0x6400; //p170: Set timer period 25KHz. P9 Fan spec PWM 25KHz.
TCC0.CCB = 0x2800; //Default value corresponding to 40% duty cycle.
AWEXC_OUTOVEN = 0xF0;//Port C