You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
FreeRTOS/FreeRTOS-Plus
Archit Aggarwal a44df5c1b9
Fix clock drift issue in SNTP demo (#655)
Issue
The existing clock discipline algorithm in the coreSNTP demo yields an inaccurate wall-clock time (in UTC) that is always behind the astronomical UTC time by the chosen polling interval period of the demo. The issue with the clock discipline algorithm was that it was calculating the slew rate to make the system clock be gradually compensated for the previous time synchronization clock drift over the period of the subsequent polling time interval. Thereby, the clock slew rate correction calculated is always lower than it should be (because it does not incorporate possible clock drift that would occur over another period of time polling interval till the next time synchronization attempt).

Fix
This PR fixes the clock discipline algorithm to make the demo calculate its system time that matches the astronomical UTC time.
The fix involves simplifying the clock discipline algorithm to use a combination of step and slew correction approaches where:

1. Step correction is applied on EVERY time successful synchronization with a time server. This immediately corrects the system time to match server time.
2. Slew rate is calculated ONCE (on the second successful time synchronization with server) and applied henceforth, on every time polling interval period to compensate gradually for the system clock drift during the period.
4 years ago
..
Demo Fix clock drift issue in SNTP demo (#655) 4 years ago
Source Cleaned up report_builder in defender_demo_json (#644) 4 years ago
Test Aws only files spell check (#593) 4 years ago
ThirdParty Move mbedtls tag to v2.25.0 4 years ago
readme.txt Update version numbers to V7.4.1. 12 years ago

readme.txt

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

Directories:

+ The FreeRTOS-Plus/Source directory contains source code for some of the
  FreeRTOS+ components.  These subdirectories contain further readme files and
  links to documentation.

+ The FreeRTOS-Plus/Demo directory contains a demo application for every most of
  the FreeRTOS+ components.  Lots of the demo applications use the FreeRTOS
  Windows simulator for easy evaluation.  Be aware that FreeRTOS is much slower
  and not deterministic when executed in a simulated environment.

+ See http://www.freertos.org/plus