Ruptor
Posts: 74
Joined: Mon Jan 27, 2014 12:26 pm
Location: London

Pulse Timer nS?

Tue Apr 05, 2016 9:35 am

You guys were very helpful in creating code to generate a nano second pulse here
viewtopic.php?t=67741
What time resolution can the RPi measure a pulse width down to? The clock suggests better than 5 nS but is there hardware like timers that can run that fast to capture a 10 nS pulse. I want to measure pulse widths in the 1 to 5 MHz region so pulse widths of down to 100 nS but with better than 10 nS accuracy. Can the RPi do this in any way?

User avatar
joan
Posts: 14936
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Pulse Timer nS?

Tue Apr 05, 2016 9:53 am

You might get an improvement using PLLC

Clock sources

0 0 Hz Ground
1 19.2 MHz oscillator
2 0 Hz testdebug0
3 0 Hz testdebug1
4 0 Hz PLLA
5 1000 MHz PLLC (changes with overclock settings)
6 500 MHz PLLD
7 216 MHz HDMI auxiliary
8-15 0 Hz Ground

What sort of things do you want to time?

Repeated events are likely to be easier than one offs.

Ruptor
Posts: 74
Joined: Mon Jan 27, 2014 12:26 pm
Location: London

Re: Pulse Timer nS?

Tue Apr 05, 2016 10:12 am

Hi Joan
Unfortunately it is single isolated pulses I would like to measure like one half cycle of a 2 MHz sine wave so 250 nS. I generate the pulses with a coil and want to measure their duration.
Here is a picture of a typical pulse that is 1300V with X axis scale of 200nS per division.
Attachments
Pulse400.jpg
Pulse400.jpg (26 KiB) Viewed 885 times

Return to “Bare metal, Assembly language”