PWM output frequency and duty

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

PWM output frequency and duty

973 Views
pandi
Contributor III

Hi everyone

 

Screenshot 2024-01-23 182125.png@xiangjun_ron

In kv31f512vll12 configured FTM0 PWM generate to set 16 KHZ frequency and Duty cycle 60% but PWM output pulse

not constant its like varying 65%,70%.if any changes of timer configuration guide me and

how to constant PWM generation also if any one know let me know.

 

how to configure constant khz and duty

Screenshot 2024-01-25 200307.png

I want to duty change means duty also not changing.

Screenshot 2024-01-25 200510.png

BR

PANDI

0 Kudos
Reply
2 Replies

948 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I suggest you call the FTM_UpdatePWMDutyCycle() in the FTM overflow ISR rather than calling it in main loop while(1) in main.

If you call it in main loop, you call it too frequently.

Hope it can help you

 

BR

XiangJun Rong

 

0 Kudos
Reply

912 Views
pandi
Contributor III

@xiangjun_rong 

thanks

0 Kudos
Reply