S32K116 EVB problem pwm using in function

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

S32K116 EVB problem pwm using in function

1,127 Views
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 Kudos
3 Replies

1,104 Views
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 Kudos

1,096 Views
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 Kudos

1,079 Views
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 Kudos