k64F precision pulse width measurement

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

k64F precision pulse width measurement

1,558件の閲覧回数
davenadler
Senior Contributor I

Need to measure a short pulse.

Precision dictates this cannot be done using interrupts on pin transition; must use a hardware timer...

Using K64F timer hardware, what's the best way to measure an external pulse width?
Thanks!

ラベル(1)
タグ(2)
0 件の賞賛
返信
3 返答(返信)

1,278件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Dave,

Please refer the ftm dual_edge_capture demo in SDK_2.3.0_FRDM-K64F.
You can download the SDK_2.3.0_FRDM-K64F from MCUXpresso SDK Builder.

ftm dual_edge_capture SDK_2.3.0_FRDM-K64F.jpg

Pulse width measurement Dual Edge Capture mode.jpg

Best Regards,

Robin

 

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

0 件の賞賛
返信

1,278件の閲覧回数
davenadler
Senior Contributor I

Thanks Robin, I saw that. Dual-edge capture relies on the pulse width being within the timer duration (longer pulses will wrap to smaller values), and flex timer is only 16-bit resolution. How can I measure a wider range of pulse values and/or get higher resolution?
Thanks,
Best Regards, Dave

0 件の賞賛
返信

1,278件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Maybe you can use the Timer Overflow Interrupt(TOF) to measure a wider range of pulse values.
Software count how many times the Timer Overflow Interrupt has happens.

For example:

pulse with.jpg

Best Regards,

Robin

 

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

0 件の賞賛
返信