The invention discloses a
signal frequency measuring method based on a period tracking method and a mobile integer period method. The
signal frequency measuring method comprises the specific steps that first, the
timer frequency f[clk] and an allowed measuring error epsilon are set; second, if the upper limit f[max] of a measured
signal frequency f is unknown, the mobile integer period method is used for measuring the
signal frequency, and if the upper limit f[max] of a measured
signal frequency f is known, whether the f[max], the f[clk] and the epsilon meet the relational expression that f[max] is smaller than f[clk]*epsilon is judged, if yes, the period tracking method is used for measuring the
signal frequency, and if not, the mobile integer period method is used for measuring the signal frequency. The period tracking method can update the measuring result in time when detecting the situation that the signal period is prolonged, and the mobile integer period method achieves the effect that the measuring result is updated at least one time in each signal period. The period tracking method and the mobile integer period method can track the changing process of the signal frequency faster, the
hysteresis error is reduced, the requested number of timers is not increased, the calculation amount is small, only a small amount of memory variable needs to be added, and therefore the hardware cost of a frequency testing device cannot be increased.