Hi Antonio.
Yes, this was a bug which was already fixed in latest release.
The root cause about code is that, the type for “chnlParams->level”, “ftm_pwm_level_select_t”, is defined as:
typedef enum _ftm_pwm_level_select
{
kFTM_NoPwmSignal = 0U,
kFTM_LowTrue,
kFTM_HighTrue
} ftm_pwm_level_select_t;
The value of enum item is also the mask for the two bits field (FTM_CnSC_ELSA_MASK and FTM_CnSC_ELSB_MASK), in previous version you have
reg |= (FTM_CnSC_ELSA(chnlParams->level) | FTM_CnSC_ELSB(chnlParams->level));
Then we fixed it and changed to use the current one, which is corrected now.
reg |= (uint32_t)(chnlParams->level << FTM_CnSC_ELSA_SHIFT);
So, I recommend you download the latest version KSDK (which is available now) or for quick fix (but not a good way) replace this part of code.
Best Regards,
Iva