The NTP packet does not include fractional time in nanoseconds. The 32-bit field for fractional time is in the full 32-bits. It counts from 0 - 4294967295, or about 233 picoseconds per tick. Dividing the fractional...
NTPv3 and below use 32-bit seconds and 32-bit fractional seconds. NTPv4 use 64-bit seconds and 64-bit fractional seconds. The Teensy 4 RTC has a 64-bit counter incremented 32768 times a second. If you take the...
The SNVS_HPRTCMR and SNVS_HPRTCLR registers together form a 64-bit counter incrementing 32768 times a second, asynchronously from the CPU clock. The lower 15 bits are returned in the readRTCfrac() call, which will...
Try this for your loop()
void loop() {
delay(1000);
uint64_t tmi = rtc_get_64();
// Convert the time value to seconds
uint64_t time_seconds = tmi >> 15;
uint64_t time_microseconds = ((tmi &...
I suggest you read through https://forum.pjrc.com/threads/61665-RTC-Registers-and-Millisecond-Precision-from-Teensy-4-0
Turns out the SNVS_HPRTCMR and SNVS_HPRTCLR together form a 64-bit counter incrementing 32768...