Okay so I figured it out. I made a simple test project in KDS 3.0 using PeX. It has 3 PWM components all running off Timer3 on channels 0, 1 and 2. There is also an Init_PIT component that generates an interrupt. On opposite cycles (determined by a boolean) of the interrupt, I enable and disable only ONE of the 3 PWM outputs. Like this:
void onek (void) {
PIT_PDD_ClearInterruptFlag(PIT_DEVICE, 0);
swap = !swap;
if (swap) { PWM1_Enable(); }
else { PWM1_Disable(); PWM1_ClrValue(); }
}
When I look at the output of the 3 PWM's on my 3-trace oscilloscope, I see that ALL 3 of the outputs are enabled and disabled. Even though I only wrote commands for one channel. I can choose any channel to modulate in this way and the other 2 will do the same thing. So the PWM(n)_Disable statement is disabling all PWM outputs that come from the same timer.
This can't possibly be expected behavior.
Please let me know how I can switch off only one channel at a time.
