Hello all,


NuttX offers a function clock_synchronize() that synchronizes system clock
with clock from RTC (internal or external). The synchronization is done 
during board initialization and I suppose this can also be called from an 
application level if required. However I was not able to find any
implementation that would automatically synchronize system time with
(correct) values from RTC if system clock drifts from real time. It seems 
the only possible option is to "force" the synchronization by calling the 
mentioned clock_synchronize() function periodically from application level.




What is your view on adding some sort of automatic synchronization that 
would ensure system clock stays in sync with RTC (or at least error is less
than some value) even when i drifts away from "real time"? Quite simple 
solution is to let clock_gettime() to update base time after N reads however
this would add some computation complexity to gettime (I2C communication 
delay for external RTC etc.) and I am not sure if we really want this inside
 clock_gettime().




Best regards,
Michal Lenc

Reply via email to