<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: K65 Real Time clock (RTC) is off by 2 minutes each day. in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-Real-Time-clock-RTC-is-off-by-2-minutes-each-day/m-p/1292001#M60849</link>
    <description>&lt;P&gt;How do you find the big offset?&lt;/P&gt;</description>
    <pubDate>Mon, 14 Jun 2021 14:46:29 GMT</pubDate>
    <dc:creator>MattJCole</dc:creator>
    <dc:date>2021-06-14T14:46:29Z</dc:date>
    <item>
      <title>K65 Real Time clock (RTC) is off by 2 minutes each day.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-Real-Time-clock-RTC-is-off-by-2-minutes-each-day/m-p/1290742#M60821</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the real time clock(RTC) on the K65 processor and by the end of the day the clock is off by 2 minutes. That is off by a very lot for what an accurate real time clock should be. I have heard of them being of by 4 minutes but it takes 31 days for the to happen not 24 hours. Is there a way to make the real time clock (RTC) accurate.&lt;/P&gt;&lt;P&gt;This is how I am configuring the Real time clock. Should I do anything different to make the real time clock&amp;nbsp; accurate.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;rtc_init();&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;initRtcOsc();//enable oscillator&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RTC_HAL_EnableCounter(g_rtcBase[RTC_IDX], true);//enable (seconds) time counter&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;static void rtc_init()&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; rtc_datetime_t rtc_date;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; //Enable clock gate to RTC module (so access to periph won't cause hardfault)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; CLOCK_SYS_EnableRtcClock(0U);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; RTC_HAL_Init(g_rtcBase[RTC_IDX]);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; //get current year so we know if we need to contact NTP for actual time&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; RTC_HAL_GetDatetime(g_rtcBase[RTC_IDX],&amp;amp;rtc_date);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; OPT_printf("%s: INFO current RTC datetime: %04hu/%02u/%02u, &amp;nbsp;%02u:%02u:%02u\n",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;__FUNCTION__,rtc_date.year,rtc_date.month,rtc_date.day,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;rtc_date.hour,rtc_date.minute,rtc_date.second);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; //note that we ignore milliseconds here (could retain current msec)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; //if current RTC year is less than the year we wrote this, our RTC&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; //isn't set, we must be on a board that is just now being initialized&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; //we are trying to minimize the need to get time from ntp as it may not be&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; //available on a deployed device (meaning this happens at factory only)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; if (rtc_date.year &amp;lt; 2017)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; TIME_STRUCT ts;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; //get time from network (SNTP sets the os time if it is successful)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; uint32_t error_code = SNTP_oneshot(0x81060f1c/*129.6.15.28 time-a-g.nist.gov*/,15000ul);//see &lt;A href="http://tf.nist.gov/tf-cgi/servers.cgi" target="_blank"&gt;http://tf.nist.gov/tf-cgi/servers.cgi&lt;/A&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; if (error_code == RTCS_OK)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; time_already_set = true;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; _time_get(&amp;amp;ts);//SNTP sets the OS to time received&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; DATE_STRUCT sntp_date = {0};&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; _time_to_date(&amp;amp;ts,&amp;amp;sntp_date);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; //set RTC seconds&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; RTC_HAL_SetDatetimeInsecs(g_rtcBase[RTC_IDX], ts.SECONDS);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; RTC_HAL_ConvertSecsToDatetime(&amp;amp;ts.SECONDS, &amp;amp;rtc_date);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; OPT_printf("%s: INFO NTP time stored in OS &amp;amp; RTC: %04u/%02u/%02u, %02u:%02u:%02u\n",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__FUNCTION__,rtc_date.year,rtc_date.month,rtc_date.day,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; rtc_date.hour,rtc_date.minute,rtc_date.second);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; }&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; else&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; OPT_printf("%s: FAIL SNTP_oneshot returned error 0x%04lx so RTC not set\n",__FUNCTION__,error_code);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; //this means our RTC is not set. next bootup it will try again&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; //to do: do we need to do something to notify?&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; }&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; }&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; else&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; //rtc appears to be set so use that time to tell OS what time it is&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; //so all use of OS time results in using time from (battery backed) RTC&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; DATE_STRUCT date = {0};&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; TIME_STRUCT ts = {0};&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; date.HOUR = rtc_date.hour;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; date.MINUTE = rtc_date.minute;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; date.SECOND = rtc_date.second;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; date.MONTH = rtc_date.month;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; date.DAY = rtc_date.day;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; date.YEAR = rtc_date.year;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; _time_from_date(&amp;amp;date, &amp;amp;ts);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; _time_set(&amp;amp;ts);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; OPT_printf("%s: INFO RTC datetime sent to OS: %04u/%02u/%02u, %02u:%02u:%02u\n",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__FUNCTION__,rtc_date.year,rtc_date.month,rtc_date.day,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; rtc_date.hour,rtc_date.minute,rtc_date.second);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; rtc_initialized = true;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;static void initRtcOsc(void)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; rtc_osc_user_config_t rtcOscConfig =&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; .freq = 32768U,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; .enableCapacitor2p = false,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; .enableCapacitor4p = false,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; .enableCapacitor8p = false,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; .enableCapacitor16p = false,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; .enableOsc = true,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; };&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; CLOCK_SYS_RtcOscInit(0U, &amp;amp;rtcOscConfig);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 12:39:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-Real-Time-clock-RTC-is-off-by-2-minutes-each-day/m-p/1290742#M60821</guid>
      <dc:creator>MattJCole</dc:creator>
      <dc:date>2021-06-10T12:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: K65 Real Time clock (RTC) is off by 2 minutes each day.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-Real-Time-clock-RTC-is-off-by-2-minutes-each-day/m-p/1290908#M60828</link>
      <description>&lt;P&gt;Is there a way to read what frequency EXTAL32 is receiving. the reason I am asking I have seen formulas that use the actual&amp;nbsp;RTC clock frequency and the expected&amp;nbsp;RTC clock frequency.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 20:31:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-Real-Time-clock-RTC-is-off-by-2-minutes-each-day/m-p/1290908#M60828</guid>
      <dc:creator>MattJCole</dc:creator>
      <dc:date>2021-06-10T20:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: K65 Real Time clock (RTC) is off by 2 minutes each day.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-Real-Time-clock-RTC-is-off-by-2-minutes-each-day/m-p/1291919#M60846</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;32kHz crystal based RTCs are typically accurate to around 5 minutes a year (&amp;lt; 1s/day) but this requires that the crystal used is matched to the circuit. The rtcOscConfig settings you are using are with no loading capacitors selected so if your RTC is running fast you can first load it more to try to correct its frequency.&lt;/P&gt;&lt;P&gt;In addition the RTC contains a variable pre-scaler which allows compensation for errors between 0.12 ppm and 3906 ppm.&lt;/P&gt;&lt;P&gt;Using these two methods it should be possible to 'tune' the circuit and the RTC to achieve acceptable accuracy. In case different batches of crystal/boards require slight adjustments the settings can be taken from parameters (in Flash) that you can adjust for each batch.&lt;/P&gt;&lt;P&gt;I use a spectrum analyser (with high impedance probe close to the circuitry it picks up the 32kHz signal and measures it with high accuracy without loading the circuit and thus potentially introducing measurement errors) in order to optimise the circuit frequency.&lt;/P&gt;&lt;P&gt;Alternatively you can do tests over a few days with different capacitor settings to see which ones give the best performance. Finally you can calculate the remaining error and compensate it with the pre-scaler.&lt;/P&gt;&lt;P&gt;Generally what I do when I receive new batches of HW is I take two of them and immediately program them up and let them run for a couple of days. If they remain accurate to &amp;lt; 0.8s a day they meet the &amp;lt;5 minutes a year (generally expected) accuracy. Should they ever not it would mean a batch of crystals have been used that have a deviation and then a fix could be made.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;P.S. If your K65 is otherwise running fro a high accuracy crystal/oscillator (these are often more accurate that the 32kHz ones) you can use it to measure a period of RTC operation to detect the deviation and then automatically adjust it by setting the pre-scaler compensation.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 12:36:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-Real-Time-clock-RTC-is-off-by-2-minutes-each-day/m-p/1291919#M60846</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2021-06-14T12:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: K65 Real Time clock (RTC) is off by 2 minutes each day.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-Real-Time-clock-RTC-is-off-by-2-minutes-each-day/m-p/1291925#M60847</link>
      <description>&lt;P&gt;I thought there was a way to calculate what you need to compensate based on temperature? Is that correct or am I wrong? If I am correct do you know how to do that?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 12:42:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-Real-Time-clock-RTC-is-off-by-2-minutes-each-day/m-p/1291925#M60847</guid>
      <dc:creator>MattJCole</dc:creator>
      <dc:date>2021-06-14T12:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: K65 Real Time clock (RTC) is off by 2 minutes each day.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-Real-Time-clock-RTC-is-off-by-2-minutes-each-day/m-p/1291971#M60848</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;RTC Crystals are designed to be pretty stable with temperatures between the 20..30°C range. Outside of this range they tend to slow down and the frequency deviation can be expressed by&lt;BR /&gt;Delta F / F = 0.04ppm x (Delta T x Delta T)&lt;/P&gt;&lt;P&gt;If you can measure the local temperature to calculate the delta from 25°C you can also compensate for shifts due to temperature. &lt;EM&gt;Search the Internet to find a plethora of articles on doing in.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;But first you need to solve your &lt;STRONG&gt;big&lt;/STRONG&gt; offset before fine tuning to compensate small drifts due to temperature could become relevant.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 14:03:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-Real-Time-clock-RTC-is-off-by-2-minutes-each-day/m-p/1291971#M60848</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2021-06-14T14:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: K65 Real Time clock (RTC) is off by 2 minutes each day.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-Real-Time-clock-RTC-is-off-by-2-minutes-each-day/m-p/1292001#M60849</link>
      <description>&lt;P&gt;How do you find the big offset?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 14:46:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-Real-Time-clock-RTC-is-off-by-2-minutes-each-day/m-p/1292001#M60849</guid>
      <dc:creator>MattJCole</dc:creator>
      <dc:date>2021-06-14T14:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: K65 Real Time clock (RTC) is off by 2 minutes each day.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-Real-Time-clock-RTC-is-off-by-2-minutes-each-day/m-p/1292036#M60850</link>
      <description>&lt;P&gt;You have found the big offset - 2 minutes in a day. It should be at least &amp;lt; 0.8s a day before it is worth looking at temperature compensation too.&lt;BR /&gt;&lt;BR /&gt;Note that the problem with temperature compensation is that it doesn't work when the RTC is running from a battery backup. It only works when the system is active (the processor is checking the temperature and performing any 'temporary' compensation). If the product is left on the shelf for a month with the RTC running from a battery and the processor is otherwise off and the temperature is either very high or very low there will be additional drift when the product is turned on the next time that has accumulated.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 15:29:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-Real-Time-clock-RTC-is-off-by-2-minutes-each-day/m-p/1292036#M60850</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2021-06-14T15:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: K65 Real Time clock (RTC) is off by 2 minutes each day.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-Real-Time-clock-RTC-is-off-by-2-minutes-each-day/m-p/1292050#M60851</link>
      <description>&lt;P&gt;Is it better to use a separate real time clock chip then to use the real time clock provided.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 15:49:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-Real-Time-clock-RTC-is-off-by-2-minutes-each-day/m-p/1292050#M60851</guid>
      <dc:creator>MattJCole</dc:creator>
      <dc:date>2021-06-14T15:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: K65 Real Time clock (RTC) is off by 2 minutes each day.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-Real-Time-clock-RTC-is-off-by-2-minutes-each-day/m-p/1292081#M60852</link>
      <description>&lt;P&gt;I would use the internal one unless there is some very special reason for using an external one (like extremely low current consumption).&lt;/P&gt;&lt;P&gt;Also the external ones may need to be tuned....&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 17:49:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K65-Real-Time-clock-RTC-is-off-by-2-minutes-each-day/m-p/1292081#M60852</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2021-06-14T17:49:16Z</dc:date>
    </item>
  </channel>
</rss>

