I am studying how to synchronize the system clock from the date and time of a GNSS receiver.
RTC is synchronized it using this function from the IRQ:
Code: Select all
/**
* @brief Set current time.
* @note This function can be called from any context but limitations
* could be imposed by the low level implementation. It is
* guaranteed that the function can be called from thread
* context.
* @note The function can be reentrant or not reentrant depending on
* the low level implementation.
*
* @param[in] rtcp pointer to RTC driver structure
* @param[in] timespec pointer to a @p RTCDateTime structure
*
* @special
*/
void rtcSetTime(RTCDriver *rtcp, const RTCDateTime *timespec)
The system clock is based on ticks. I'm a newbie. How can I synchronize it or estimate the correction factor to be applied to it?
Thanks you.