Timer Frequency Read

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Timer Frequency Read

Jump to solution
228 Views
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

 

Tags (1)
0 Kudos
1 Solution
171 Views
_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!

View solution in original post

0 Kudos
1 Reply
172 Views
_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 Kudos