How to synchronize PWM output

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to synchronize PWM output

ソリューションへジャンプ
965件の閲覧回数
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 解決策
863件の閲覧回数
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 返信
864件の閲覧回数
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 件の賞賛
返信