k64F precision pulse width measurement

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

k64F precision pulse width measurement

1,559 次查看
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,279 次查看
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,279 次查看
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,279 次查看
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 项奖励
回复