Timer Frequency Read

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

Timer Frequency Read

跳至解决方案
1,519 次查看
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,462 次查看
_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,463 次查看
_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 项奖励
回复