STM32: clock sync: Simple PI controller for speed adjustments; converges to +-100 usec in few minutes

This commit is contained in:
Pavel Kirienko
2014-04-12 21:21:02 +04:00
parent 67f92628a8
commit d8c37584c0
3 changed files with 28 additions and 31 deletions
@@ -50,6 +50,13 @@ uavcan::int32_t getUtcSpeedCorrectionPPM();
*/
uavcan::uint32_t getUtcAjdustmentJumpCount();
/**
* Returns clock error sampled at previous UTC adjustment.
* Positive if the hardware timer is slower than reference time.
* This function is thread safe.
*/
uavcan::UtcDuration getPrevUtcAdjustment();
}
/**