How to measure period between GPIO events

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

How to measure period between GPIO events

840件の閲覧回数
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 返信

752件の閲覧回数
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 件の賞賛
返信