How can i capture rise edge to compute frequency?

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

How can i capture rise edge to compute frequency?

1,040 Views
ricardcomas
Contributor III

Hi, i m using a MKE06128VLK processor, i have a PWM signal, wich is a component to compute frequency? can i do it with a capture component?¿ i try to use it but i don't get work it.

thanks!

0 Kudos
Reply
2 Replies

831 Views
hamed
Contributor I

Hello ricardcomas

This MCU has built-in Pulse Width Timer (PWT) that is able to measure both positive and negative pulse widths and can be triggered at rising or falling edge. You can refer to page 495 on the reference manual for detailed information. Hope it helps.

0 Kudos
Reply

831 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Ricard Comas,

Yes, you can use the Input Caputer mode to compute frequency.

In Input Caputer mode,when a selected edge occurs on the channel input, the current value of the FTM counter
is captured into the CnV register, therefore the measured period of the signal (e.g. rising edge to rising edge) is equal to difference of the captured values.

What about your problem ?

Note that the maximum frequency for the channel input signal to bedetected correctly is system clock divided by 4.

There is comment about using input caputer mode to compute frequency , you can have a loo。

capture_LDD-result       

Hope it helps,


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply