S32 SDK BETA 0.9.0 FlexPWM Update

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

S32 SDK BETA 0.9.0 FlexPWM Update

跳至解决方案
1,562 次查看
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?

标签 (1)
0 项奖励
1 解答
1,388 次查看
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

在原帖中查看解决方案

1 回复
1,389 次查看
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