AnsweredAssumed Answered

S32 SDK BETA 0.9.0 FlexPWM Update

Question asked by chuluezhong on Jun 28, 2018
Latest reply on Jun 28, 2018 by Cezar Dobromir

I'm experiencing problems in updating FlexPWM duty cycle using the SDK 0.9.0 for MPC5744P. I am assuming that updating the PWM only requires two function calls:

FLEXPWM_DRV_UpdatePulseWidth(INST_FLEXPWM0, 0, pulseWidthA, pulseWidthB, PWM_Alignment);

FLEXPWM_DRV_LoadCommands(INST_FLEXPWM0, 0);

which correspond to updating the relevant VAL registers and then writing LDOK. #

 

However, as can be seen in the screenshot, when I try to update the PWM, I get that VAL2 > VAL3 and similarly VAL5 > VAL4. This is easily seen by using PWM Edge Alignment, where VAL2 and VAL4 should both be at the initial value, which is 0 as that is how PWM Edge Alignment is defined within flexpwm_driver.c. As a consequence of this, the PWM output is showing only the last valid set-up.

 

Am I missing some driver call or perhaps is there something wrong with the driver?

Attachments

Outcomes