How to synchronize PWM output

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

How to synchronize PWM output

跳至解决方案
960 次查看
a8Chcx
Contributor V

Hi,

I am using K64F FlexTimer channel0 as my PWM output. I am using PE to configure channel0 as output compare with toggle output.

I disable the software output control and interrupt...

In my main rountine, I just change  FTM0_MOD register to get the different PMW output(50/50) every second. It works fine. The only problem is that PWM out frequency can be changed in middle.

Could you tell me how to control the loading point of the new value, like always after complete PWM output?

Another question: Is it possible to change the polarity of channel0?

Thanks,

Christie

0 项奖励
回复
1 解答
858 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Christie,

(1) Do you want to change the frequency of PWM ? if yes , update the MOD register we can refer to the RM here :

(2) About change the polarity of channel0 ,  we can use  "ELSnB "and "ELSnA" :

( 40.3.6 Channel (n) Status And Control (FTMx_CnSC)  )

pastedImage_2.png

pastedImage_1.png

Hope it helps

Alice

在原帖中查看解决方案

0 项奖励
回复
1 回复
859 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Christie,

(1) Do you want to change the frequency of PWM ? if yes , update the MOD register we can refer to the RM here :

(2) About change the polarity of channel0 ,  we can use  "ELSnB "and "ELSnA" :

( 40.3.6 Channel (n) Status And Control (FTMx_CnSC)  )

pastedImage_2.png

pastedImage_1.png

Hope it helps

Alice

0 项奖励
回复