Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sntp: calibrate to the ntp times rather than the system function. #157

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

sntp: calibrate to the ntp times rather than the system function. #157

wants to merge 1 commit into from

Commits on Jul 1, 2016

  1. sntp: calibrate to the ntp times rather than the system function.

    The system sdk_system_rtc_clock_cali_proc() is rather noisy, so
    this patch calibrates the RTC count to the NTP time responses.
    
    An average of many calls to sdk_system_rtc_clock_cali_proc() is used
    for initialization.
    
    The system calibration value is used to limit the calibration value
    computed via the ntp times, to 1/16 either way.
    
    A 64 bit RTC counter is implemented, and used in the calculations, but
    might be of some use on its own.
    
    The ratio of the ntp time differences and the RTC count differences is
    filtered a little to keep the changes relatively stable and to filter
    the jitter.
    iosen committed Jul 1, 2016
    Configuration menu
    Copy the full SHA
    b1f7a04 View commit details
    Browse the repository at this point in the history