S32 SDK BETA 0.9.0 FlexPWM Update

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32 SDK BETA 0.9.0 FlexPWM Update

Jump to solution
2,332 Views
chuluezhong
Contributor II

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?

Labels (1)
0 Kudos
Reply
1 Solution
2,158 Views
cezardobromir
NXP Employee
NXP Employee

Hello Chulue,

This is a known issue on EmbSys Register view as the data is interpreted incorrectly and there is an opened ticket for it to be fixed. Giving the fact that the registers are in a 16 bit format it switches the register when displaying them one with another. The registers however are updated correctly and the memory monitor can be used in order to display the correct information for FlexPWM.

Best regards,

Cezar

View solution in original post

1 Reply
2,159 Views
cezardobromir
NXP Employee
NXP Employee

Hello Chulue,

This is a known issue on EmbSys Register view as the data is interpreted incorrectly and there is an opened ticket for it to be fixed. Giving the fact that the registers are in a 16 bit format it switches the register when displaying them one with another. The registers however are updated correctly and the memory monitor can be used in order to display the correct information for FlexPWM.

Best regards,

Cezar