<p>There are hacks in <a href="/benemorius/RIOT/commits/openlabs">benemorius/RIOT/openlabs</a> that facilitate checking the RTC against a good-enough timebase:</p>
<ul>
<li>run <code>gnrc_border_router</code> example compiled with periph_rtc and sntp</li>
</ul>
<div class="highlight highlight-source-shell"><pre>USEMODULE+=<span class="pl-s"><span class="pl-pds">"</span>periph_rtc sntp<span class="pl-pds">"</span></span> make flash</pre></div>
<ul>
<li>use <code>ntpdate</code> to set the rtc with an ntp server running on the border router pi</li>
</ul>
<div class="highlight highlight-source-shell"><pre><span class="pl-k">></span> ntpdate - - -r
using address fe80::1
wrote second 50 at second 49
waited 351563 usecs (wanted 351580 usecs) (error -17 usecs)</pre></div>
<ul>
<li>wait hours or days</li>
<li>use <code>ntpdate</code> to set the system time from the ntp server</li>
</ul>
<div class="highlight highlight-source-shell"><pre><span class="pl-k">></span> ntpdate - - -s
using address fe80::1
2019-09-20 07:51:26 UTC (2677822960 ms) (428 us)</pre></div>
<ul>
<li>use <code>date</code> to compare the system time to the rtc time</li>
</ul>
<div class="highlight highlight-source-shell"><pre><span class="pl-k">></span> date
2019-09-20 07:51:45.517515
RTC differs from system <span class="pl-k">time</span> by +0.004336 seconds</pre></div>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/12280?email_source=notifications&email_token=ABE7WYBPCNTV2I3NT52NCKLQKR7N3A5CNFSM4IYTGA7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7F5NII#issuecomment-533452449">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYHLIMVQHN57UQA2LQLQKR7N3ANCNFSM4IYTGA7A">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYGCKF4EONVITBJVD6TQKR7N3A5CNFSM4IYTGA7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7F5NII.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/12280?email_source=notifications\u0026email_token=ABE7WYBPCNTV2I3NT52NCKLQKR7N3A5CNFSM4IYTGA7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7F5NII#issuecomment-533452449",
"url": "https://github.com/RIOT-OS/RIOT/pull/12280?email_source=notifications\u0026email_token=ABE7WYBPCNTV2I3NT52NCKLQKR7N3A5CNFSM4IYTGA7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7F5NII#issuecomment-533452449",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>