Hello Dave,
I have analyzed the fsl_ftm a possible cause of your issue. It seems that you have enabled a trigger (e.g. Software trigger - see Settings/Basic configurations/Triggers group of properties).
When the FTM_DRV_Init is executed the counter is not started. You can write into all channel registers (CnV registers). When you start the first PWM channel by the PwmStart method (the FTM counter is also started) and the writing to the FTM registers is triggered. So you must execute the trigger to start the second PWM (after call of the PwmStart method for the second channel).
For example, when you enable Software trigger, you must call FTM_HAL_SetSoftwareTriggerCmd(FTM0_BASE, true). See for example the initialization sequence of two PWM channels
FTM_DRV_Init(FSL_FLEXTIMER1,&flexTimer1_InitConfig0);
FTM_DRV_CounterStart(FSL_FLEXTIMER1,kCounting_FTM_UP, 0, 0xFFFF, false); // starting of the FTM counter
FTM_DRV_PwmStart(FSL_FLEXTIMER1,&flexTimer1_ChnConfig0,0U); //register values are stored into FTM buffers and PWM channel is not running after execution (channel registers are not updated)
FTM_DRV_PwmStart(FSL_FLEXTIMER1,&flexTimer1_ChnConfig1,1U); //register values are stored into buffers and PWM channel is not running after execution (channel registers are not updated)
FTM_HAL_SetSoftwareTriggerCmd(FTM0_BASE, true); // when executed both PWM channels start running
For details, see chapter PWM synchronization of FTM device description in a reference manual (e.g. K64P144M120SF5RM)
Best Regards,
Marek Neuzil