The paper presents a spectral method for robust and accurate real-time freq
uency estimation when a square wave affected by impulsive noise is consider
ed, The method, tailored for signals coming from typical resonant sensors (
frequency from 2 kHz to 22 kHz), has been implemented and tested using a fl
oating-point digital signal Pprocessor (DSP) and a 16-bit analog-to-digital
converter (ADC), It has been observed that there is a greater immunity to
glitches with respect to the classic solution based on Constant Elapsed Tim
e, while resolution (10(-6)) and measuring time (10 ms), are close to the o
nes of traditional high-cost laboratory instrumentation.