Timer Frequency Read

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,437件の閲覧回数
Bkaya
Contributor III

Hello;

In my application, i aim to read frequency with flex timers for duty cycle measurements. 

Here is my code:

1) Initialized pwm  and then set input capture modes for all pins.

Bkaya_0-1706862642467.png

Bkaya_1-1706862724440.png

2) Enabled interrupt routine and started timer for all channels.

Bkaya_3-1706862911634.png

3)  Read value when capture flag triggered.

Bkaya_5-1706863788008.png

4) Interrput function for overflow check.

Bkaya_6-1706863856050.png

 

I set 5V-1kHz-%50 pwm signal on pin but i did not read values and trigger interrupts. What should i change on configs? Also if there is example or application note about this, please share with me.

Thanks for help.

 

Best Regards.

Basri KAYA

 

タグ(1)
0 件の賞賛
返信
1 解決策
1,380件の閲覧回数
_Leo_
NXP TechSupport
NXP TechSupport

Hi,

Thank you so much for your interest in our products and for using our community.

Sorry there is no SDK example of input capture with the eFlexPWM, just what reference manual states about it.

However if you have available any TMR module you can refer to the SDK examples qtmr_inputcapture_outputpwm.

Hope it helps you.

Have a nice day!

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,381件の閲覧回数
_Leo_
NXP TechSupport
NXP TechSupport

Hi,

Thank you so much for your interest in our products and for using our community.

Sorry there is no SDK example of input capture with the eFlexPWM, just what reference manual states about it.

However if you have available any TMR module you can refer to the SDK examples qtmr_inputcapture_outputpwm.

Hope it helps you.

Have a nice day!

0 件の賞賛
返信