AnsweredAssumed Answered

Best way to turn PWM Output off using S08PA16 FTM

Question asked by David Evennou on Mar 22, 2013
Latest reply on Jul 2, 2013 by Eduardo Viramontes Guerra



What is the best way to turn off a PWM Ouput from the FTM?

I am using two PWM Outputs and need to alternate between them with only one PWM Output running at a time.


I tried the method below on the FTM, but it does not work when I set FTMEN to 1. (required to get correct clock divider)


Code example:

FTM2_C4SC = 0x28; // set channel 4 as PWM Output
FTM2_C4SC = 0x00; // set channel 4 as Input Capture

When the code starts up, the channel is in Input Capture Mode and does not switch to PWM Mode.


Note: On the TPM this method works fine.