PWM output frequency and duty

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

PWM output frequency and duty

974 次查看
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 项奖励
回复
2 回复数

949 次查看
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 项奖励
回复

913 次查看
pandi
Contributor III

@xiangjun_rong 

thanks

0 项奖励
回复