S32K116 EVB problem pwm using in function

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

S32K116 EVB problem pwm using in function

1,728 次查看
mfatihkoseoglu
Contributor I

Hello, I'am using S32K116 evb. I want to use pwm driver but if i use this function in another function and i call this function in while() there is a problem. If i use ftm pwm driver in while loop, there is not problem. I add picture about this problem. Why is there this problem? 

0 项奖励
回复
3 回复数

1,705 次查看
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello

Hope you are well.
The status of the function is read through a variable type status_t. Adding a small delay when the function is called could solve the problem.
Besides moving the methods of the function to a while are doing another change to the function. A more detailed description of the function might help.

Let me know if this solves the problem, if you have more questions do not hesitate to ask me.
Best regards,
Omar

0 项奖励
回复

1,697 次查看
mfatihkoseoglu
Contributor I

Hello Omar, 

Thanks, I am fine and hope you too. 

I add a delay and this func is work. But why? Why I use delay? 

0 项奖励
回复

1,680 次查看
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello

The registers you update in the FTM_DRV_UpdatePwmChannel() function need some cycles to be updated. You can consult it in detail in chapter 47.5.12.3 of the reference manual.

If you have more questions do not hesitate to ask me.
Best regards,
Omar

0 项奖励
回复