How to measure period between GPIO events

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

How to measure period between GPIO events

837 次查看
swanner
Contributor I

I am attempting to measure the period between two events on different GPIO pins. I am assuming that to do this I use GPIO interrupts and GPT timer and concern on resolution down to 10 ns detection. Note that I am doing this in the user space? Is this correct path or is there a better method? What overhead will the software bring?

标签 (1)
0 项奖励
回复
1 回复

749 次查看
Carlos_Musich
NXP Employee
NXP Employee

Hi shannon,

if you need to measure this in your application the approach you described is OK. The only thing that you need to consider is that the drivers are handled by the Operating System and it may cause some latency when measuring the time.

Other way can be in bare metal code, but we no longer provide the bare metal sdk for iMX.

And other approach could be to write to the registers directly in the initialization script that configures DDR memory. Here you can add instructions to toggle GPIOs and measure time with oscilloscope. This would be the most exact measuring.


Best regards,
Carlos

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

0 项奖励
回复