AnsweredAssumed Answered

MC_PMSM :: /* initial value of the FTM counter */   

Question asked by Amer Zater on Jan 8, 2019
Latest reply on Jan 8, 2019 by Hui_Ma

Can I ask what is the meaning of the minus operator (-)at defining the initial value of FTM0 for generating 3phase PWM signals at MC_PMSM library?

what does it mean?

Simply, the initial value of FTM0 should be assigned to  ui16PwmModulo / 2 ...not to (-ui16PwmModulo / 2 )

 

/* initial value of the FTM counter */
FTM0->CNTIN = (uint32_t)(-g_sClockSetup.ui16PwmModulo / 2);

Outcomes