Seeed-Studio / Seeed_Arduino_RTC

When your project needs to be unplugged, how to keep the time counting? This library can help you set up the current time.
MIT License
9 stars 7 forks source link

[Adafruit Matrix Portal][SAMD51] Doesn't Keep Time correctly #8

Open LRagji opened 8 months ago

LRagji commented 8 months ago

Using a SAMD51 board (Matrix Portal from Adafruit) I am using this library to keep time but it somehow seems to be counting time faster than expected, Steps to reproduce: Sync Time from NTP Set the time in the RTC by using adjust time Function, Set a minute alarm and update the RGB matrix every minute as a part of the interrupt.

Does everything correctly but after keeping the clock running overnight it gets ahead of the actual time by ~10 mins

You can check my code here

I assume something is reusing the timers which are used by RTC which makes them faster? not sure where the issue is.....

LRagji commented 8 months ago

I thought #define CRYSTALLESS 1 should solve the issue (not sure why there is no documentation on this anywhere), but even with the same, time is drifting 1 min ahead per hour :( not sure what's going wrong.