Using Hall Sensor(TLE-4905) with Arduino Mega

cattledog:
I don't confirm what you are seeing. I changed the millis() timer to micros() and set the measurement period = 1000. With tone(11,50000) I am seeing counts of 49 or 50 with a period from 1000 to 1012 us.

Cattledog ..... when I used your original code, and when I changed millis to micros, I get an increased number of counts .... up to 80 counts (instead of the expected 50). I get the same effect with two different MEGA 2560 boards. Interestingly --- when I keep only the serial.print statement for printing the number of counts (and remove all other serial.print statements), the number of counts becomes the expected '50', or close to it.

I don't yet know the reason behind the increased the number of counts due to having additional serial.print lines. The nice thing is --- we definitely get improvement when we reset the reference times AFTER the set of serial.print lines.