Community news, upcoming events and general discussions
Threads: 34 Posts: 86
Get technical support from the community
Threads: 1351 Posts: 7325
Threads: 18 Posts: 64
Tell us how to make XDK better!
Threads: 35 Posts: 117
Share and discuss community member projects
Threads: 76 Posts: 337
Hello - I was just about to write to the community board, when I did read this:
" [...] The question with the current time and date is a little more tricky. The XDK has no "real-time-clock", it only counts ticks from the system start. Therefore, you need to (at least once) get the current time from an external source (e.g. NTP servers). Also, it was reported that the clock ticks aren't perfectly accurate. [...] "
Therefore my improvement contribution clearly is: Please add an accurate XDK real-time-clock
I am using the XDK as data logger and without an accurate timestamp there is no possibility to link data in the IoT thinking. At the moment I can not connect data from different sources, since this valuable information is missing.
Also detailed information about "the clock ticks aren't perfectly accurate" would be very important, since any frequency based approach depends on the Nyquist frequency!
Only with an accurate time-stamp, the time of creation of a data point listed in either csv/json/xml... adds value to downstream data analysis. The time it takes to transmit a file through the network is already not precise enough (even in the range of (low) seconds), especially when a loss of connection can not be ruled out in the prodcution environment. Especially in this case, the embedded memory or SD-card needs to act as a local data sink (dt: 'Datensenke') to prevent data loss till reconnect. Here the time becomes a critical component again.
Hoping to hear from you :-)
Hello Andreas, thank you very much for you improvement. I completely agree with you, that accurate time stamps are essential for XDK development. For more information about the time ticks precision see here. But please consider that a real-time-clock needs to be supported by the hardware and is not common in micro controller environments. As we already mentioned, if a stable real time is required for your specific use case, you can still get the time from NTP servers. Nevertheless I will discuss this topic with the XDK-team. Kind regards, Manuel
Have you discussed with the XDK team regarding rtc implementation or an example to retain the current Unix epoch time on XDK via NTP?
Hello Duc, as I already mentioned RTC needs to be supported by the hardware. This is not the case with the XDK. Thus the only possibility is to implement NTP on your own. I have already seen NTP implementations on the XDK and it is working fine. Unfortunately I currently cannot provide such an implementation right now. But there are great NTP implementations online for the Arduino that can easily be adapted for the XDK. Kind regards, Manuel