I'm trying to get a 100ms interrupt with a 32 bits counter on Arduino M0.
"MartinL" help me about 32 bits counter, it's working fine now : http://forum.arduino.cc/index.php?topic=396804.60
He pointed out that the exact frequency of SAMD21 is 1464*32768=47972352Hz (crystals/crystals.txt at master · manitou48/crystals · GitHub)
If I preload with 4797235 (1464*32768/10) I got a drift compared to the real time like ~100ms in 10 minutes.
I found a pretty good value (4798375) after some tries, but is there a smarter method to find the perfect value ?
Something like 10ms drift for 1 hour is perfectly fine for me.