<?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: KE1 WDOG Prescaler Inaccuracies with LPO Clock in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KE1-WDOG-Prescaler-Inaccuracies-with-LPO-Clock/m-p/2389199#M68417</link>
    <description>&lt;P&gt;Thanks for the clarification. I had a feeling it had something to do with the low frequency. Interesting to know that the low TOVAL is also part of the issue.&lt;/P&gt;&lt;P&gt;I already fixed this to use the LPO clock without the prescaler and TOVAL of 2560 as you suggested. Also added an extra WDOG refresh during this one time extended process that was overrunning the WDOG timeout.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Jul 2026 15:14:21 GMT</pubDate>
    <dc:creator>sean_dvorscak</dc:creator>
    <dc:date>2026-07-01T15:14:21Z</dc:date>
    <item>
      <title>KE1 WDOG Prescaler Inaccuracies with LPO Clock</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KE1-WDOG-Prescaler-Inaccuracies-with-LPO-Clock/m-p/2387876#M68412</link>
      <description>&lt;P&gt;I am trying to run WDOG with a 20ms timeout.&lt;/P&gt;&lt;P&gt;I've configured the WDOG_CS for LPO clock source (128kHz) and PRES = 1, and WDOG_TOVAL = 0x000A.&lt;/P&gt;&lt;P&gt;That should be 10/(128,000/256) = 10/500 = 0.02s.&lt;/P&gt;&lt;P&gt;However, I started noticing some inconsistencies that led me to believe I am overrunning the 20ms in my SW, but the WDOG wasn't resetting me. I then instrumented my code to Set/Clear a GPIO pin to see how much time was elapsing before I refreshed the WDOG, and saw 20.67ms from refresh to refresh.&lt;/P&gt;&lt;P&gt;I was curious to see how long the WDOG timeout is actually set for, so I then added some dummy delays just after refreshing the WDOG that would just wait for the WDOG to reset. The Oscope showed 24ms from refresh to timeout.&lt;/P&gt;&lt;P&gt;I then confirmed using the CLKOUT pin that the LPO clock was indeed running at 128kHz.&lt;/P&gt;&lt;P&gt;Frustrated, I then switched my clock source to the SIRC and adjusted the TOVAL = 625 (625/[8MHz/256] = 625/31250 = 0.02s). Running the same test as before, I saw 20ms on the dot.&lt;/P&gt;&lt;P&gt;I got confused so I then reverted back to the LPO clock, but removed the prescaler. I was concerned that the low frequency was causing some sort of error. When reverting back to the LPO clock without prescaler, and setting TOVAL = 2560 (2560/128000 = 0.02s), I started to see 20ms timeouts from the WDOG.&lt;/P&gt;&lt;P&gt;My question is why did I see such a huge accuracy hit when using the prescaler with the LPO clock? I didn't see the accuracy hit with the SIRC using prescaler. Is there a known error when it comes to this configuration? Frequency too low?&lt;/P&gt;&lt;P&gt;Very confused.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2026 18:25:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KE1-WDOG-Prescaler-Inaccuracies-with-LPO-Clock/m-p/2387876#M68412</guid>
      <dc:creator>sean_dvorscak</dc:creator>
      <dc:date>2026-06-29T18:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: KE1 WDOG Prescaler Inaccuracies with LPO Clock</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KE1-WDOG-Prescaler-Inaccuracies-with-LPO-Clock/m-p/2388157#M68415</link>
      <description>&lt;P&gt;&lt;FONT color="#000000"&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/90401"&gt;@sean_dvorscak&lt;/a&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN&gt;Your theoretical calculation is correct: with a 128 kHz LPO clock and&amp;nbsp;WDOG_CS[PRES] = 1&amp;nbsp;, the WDOG clock becomes 500 Hz. Therefore, with&amp;nbsp;TOVAL = 10&amp;nbsp;, the theoretical timeout is 20 ms.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN&gt; However, in this configuration, the counter tick is 2 ms, and&amp;nbsp;&lt;STRONG&gt;TOVAL = 10&amp;nbsp;is a very small count value&lt;/STRONG&gt;. Any internal synchronization, configuration update, or refresh-path latency can therefore be magnified into millisecond-level timing differences.&amp;nbsp; Therefore, we do not recommend using LPO + ÷256 with such a small&amp;nbsp;TOVAL&amp;nbsp;value to implement an accurate 20 ms watchdog timeout. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN&gt;If a 20 ms timeout is required, &lt;STRONG&gt;we recommend using the LPO without the prescaler and setting&amp;nbsp;TOVAL = 2560&amp;nbsp;&lt;/STRONG&gt;, or using the 8 MHz SIRC with ÷256 and setting&amp;nbsp;TOVAL = 625&amp;nbsp;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN&gt; If the software refresh interval may reach 20.67 ms, we also recommend increasing the watchdog timeout to provide sufficient design margin.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=""&gt;Hope it helps.&lt;/P&gt;
&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=""&gt;Thank you.&lt;/P&gt;
&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=""&gt;BR&lt;/P&gt;
&lt;P class=""&gt;Alice&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2026 08:00:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KE1-WDOG-Prescaler-Inaccuracies-with-LPO-Clock/m-p/2388157#M68415</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2026-06-30T08:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: KE1 WDOG Prescaler Inaccuracies with LPO Clock</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KE1-WDOG-Prescaler-Inaccuracies-with-LPO-Clock/m-p/2389199#M68417</link>
      <description>&lt;P&gt;Thanks for the clarification. I had a feeling it had something to do with the low frequency. Interesting to know that the low TOVAL is also part of the issue.&lt;/P&gt;&lt;P&gt;I already fixed this to use the LPO clock without the prescaler and TOVAL of 2560 as you suggested. Also added an extra WDOG refresh during this one time extended process that was overrunning the WDOG timeout.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2026 15:14:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KE1-WDOG-Prescaler-Inaccuracies-with-LPO-Clock/m-p/2389199#M68417</guid>
      <dc:creator>sean_dvorscak</dc:creator>
      <dc:date>2026-07-01T15:14:21Z</dc:date>
    </item>
  </channel>
</rss>

