Real Time Clock drafts on EHS6 | Telit Cinterion IoT Developer Community
July 6, 2015 - 9:40am, 2207 views
Hi,
So we've built an application on the EHS6 platform. Everything works perfect and we're so far all good, except of one little issue. The real time clock appears to draft by time.
When the application starts, it fetches the latest time from our servers and sets in using "AT+CCLK". Then we are using "System.currenttimemillis()" from whithin the application to get the time. If we do so right after the time has been set using "AT+CCLK" everything seems to be just perfect but, after som time the clock starts to draft and outrun the actual real time. We are not talking about microseconds, in outruns by seconds. If we leave the application running for a few days it can draft up to one minute.
Right now we are trying to investigate what's causing this behavior. We use around 5-10 timers and 5-10 concurrent threads in the app, could this cause any problems with the real time clock? Could maybe to many "Thread.sleep" cause the real time clock to draft?
Does this sound familar to anyone?
Hello,
The RTC on this module is not extremely accurate. It may depend on many factors like temperature, system load and others. Please avoid loops where you do almost nothing without any additional delay because this brings a significant load and is generally not a good practice.
So the best solution for improving the RTC accuracy would be time synchronization in a regular basis, for example once a day.
Regards,
Bartłomiej