Using the Real Time Clock (RTC) on Zymkey


#21

Zymkey would be able to provide a stable time reference when your host computer boots up. From that point on, you can reference the time using the standard libraries (e.g. time function call in C or date command line utility). However, the host pi clock will continue to drift independently after the boot-time reference is obtained from Zymkey. Another option would be to call the Zymkey API to get the clock in C/C++/Python.

We don’t expose an API which would allow one to set the Zymkey RTC since Zymkey is considered to be a secure device. Instead, an interface daemon determines when NTP is synchronized and enabled and sets the time from the current system time.

Hope this helps.


#22

Thanks for your answer.
So if I do not have any NTP, I cannot set the time or adjust it if needed ? My device will never be connected to any ntp server…


#23

This is true. We think of the Zymkey’s RTC as more of a “time bootstrap” during power and/or network outages. And, to promote security, we don’t allow the time to be set in user space by an arbitrary application. Although I don’t know the exact circumstances in your use case, in a real deployment which would never be in contact with an NTP time source, I would recommend allowing the time to be set by NTP one time before deployment in the field.


#24