Hello,
I am using an Arduino Nano-ble-33 and I am having issue counting edges. The values seem to be roughly 0.4% higher than they should be. If I put a 1000Hz clock, I get roughly 1004, at 10kHz I get ~10040, at 100KHz I get ~100400, etc. It gets worse the higher the freq. I read the errata and implemented the recommended fix. The input signal is spot on, measured with two scopes.
I believe it is set up correctly according to the spec. I just don't see where the extra pulses are coming from.
Below is a snippet of the output. I am running two timers with the same signal as input. The first value is the time in microseconds. As you can see, the variation in time can't account for the extra counts. I am assuming micros() is accurate.
Below is my code.
Thanks,
Anthony