FreeRTOS-Kernel/FreeRTOS-Plus/Demo
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.
2021-07-19 16:05:35 -07:00
..
AWS Cleaned up report_builder in defender_demo_json (#644) 2021-07-14 14:12:23 -07:00
Common Merge FreeRTOS 202104.00 to main (#585) 2021-04-29 14:53:40 -07:00
coreHTTP_Windows_Simulator Merge FreeRTOS 202104.00 to main (#585) 2021-04-29 14:53:40 -07:00
coreMQTT_Windows_Simulator Merge FreeRTOS 202104.00 to main (#585) 2021-04-29 14:53:40 -07:00
corePKCS11_MQTT_Mutual_Auth_Windows_Simulator Merge FreeRTOS 202104.00 to main (#585) 2021-04-29 14:53:40 -07:00
corePKCS11_Windows_Simulator [P3] Update corePKCS11 demo to read the public key (#652) 2021-07-16 16:30:09 -07:00
coreSNTP_Windows_Simulator Fix clock drift issue in SNTP demo (#655) 2021-07-19 16:05:35 -07:00
FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator Merge FreeRTOS 202104.00 to main (#585) 2021-04-29 14:53:40 -07:00
FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator Update to MIT licensed FreeRTOS V10.0.0 - see https://www.freertos.org/History.txt 2017-11-29 16:53:26 +00:00
FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator Aws only files spell check (#593) 2021-05-13 16:07:56 -07:00
FreeRTOS_Plus_TCP_Echo_Posix Let vAssertCalled() produce some logging to stdout (#598) 2021-05-14 12:17:47 -07:00
FreeRTOS_Plus_TCP_Echo_Qemu_mps2 Fix data copy address error (#634) 2021-06-29 10:18:00 -07:00
FreeRTOS_Plus_TCP_Minimal_Windows_Simulator Aws only files spell check (#593) 2021-05-13 16:07:56 -07:00
FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator Merge FreeRTOS 202104.00 to main (#585) 2021-04-29 14:53:40 -07:00
FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC FreeRTOS+UDP was removed in FreeRTOS V10.1.0 as it was replaced by FreeRTOS+TCP, 2018-08-23 00:00:20 +00:00
FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator Merge FreeRTOS 202104.00 to main (#585) 2021-04-29 14:53:40 -07:00
FreeRTOS_Plus_WolfSSL_Windows_Simulator Merge FreeRTOS 202104.00 to main (#585) 2021-04-29 14:53:40 -07:00
Also_See_More_FreeRTOS+TCP_and_FreeRTOS_FAT_in_the_lab.url FreeRTOS+TCP: Added ipconfigSOCKET_HAS_USER_WAKE_CALLBACK configuration option so the user can specify a callback to execute when data arrives. 2017-12-12 17:47:56 +00:00
readme.txt Update version numbers to V7.4.1. 2013-04-18 12:58:17 +00:00

Directories:

+ 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