cancel
Showing results for 
Search instead for 
Did you mean: 

Can pulses greater than 5ns be detected by mcu?

Burakgvl
Associate II

Hi

Can any Mcu detect a 5ns wide pulse? Is MCU clock speed important in this case? Or are MCU pin speeds important?

Are MCUs capable of detecting such a low amplitude signal?

Many thanks for any guidance provided...

3 REPLIES 3
LCE
Principal

"Greater" than 5 ns for sure... 😉

Take 2 timers running with at least 400 MHz (is there an STM32 with such fast timers?), sync these.

Set both to input capture, connect the input signal to both input capture channels.

Set one timer to capture rising edge, the other to falling.

That might work. But with 5 ns you get into propagation territory, apart from other non-defined timing issues on an SOC like the STM32. I've learned that recently, very frustrating.

I think I've seen something somewhere with "ps" resolution, though not sure if it was a) input capture, or b) a TI MCU.

Or take an FPGA.

Uwe Bonnes
Principal II

Use a fast TTL 123 to enlarge the pulse to at least the timer clock. My question about the capabilities of the ETR input however is still pending.

Michal Dudka
Senior III

Detect should be possible. Timers should be possible count pulses with duration longer then timer period. Timers at STM32H7 have clock up to 240 (275) MHz with period 4.16 (3.63) ns - that are theoreticaly shortest pulses that they can detect. Moreover HRTIM with 400MHz possibly can detect pulses from 2.5ns. Pulses of course have to match MCU logic level signals (for example 3.3V). Speed of MCU determines speed of timers and thus it is important.

If pulses have low amplitude, then you need external fast comparator to translate pulse into regular CMOS signal.

But there are simple ways how to detect pulse presence even with slow MCUs. Simple take cheap "fast" Flip flop like 74LVC1G74, connect D input to High level and connect your pulses to Clock input. When pulse hits Clock, circuit generate high level at output and stay in that status until it is cleared by MCU.

But if you need to measure pulse length, it is more complicated... but there is ways depending on desired resolution.