<?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 Confusion in example for KE watchdog in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Confusion-in-example-for-KE-watchdog/m-p/317139#M14021</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With reference to the KE02 manual - the watchdog example code is given as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_8.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44846iB01C7E23E062B3EF/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_8.png" alt="pastedImage_8.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This however gives a watchdog timeout of &lt;SPAN style="text-decoration: underline;"&gt;59.395 seconds&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason for this is also given in the manual:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44847i4197079F873CFEED/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code should therefore be either&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WDOG_TOVALH = (unsigned char )(1000 &amp;gt;&amp;gt; 8);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WDOG_TOVALL = (unsigned char )(1000);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or &lt;STRONG&gt;WDOG_TOVAL = (unsigned short)((1000 &amp;gt;&amp;gt; 8) | (1000 &amp;lt;&amp;lt; 8));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and then does give the advertised 1s timeout.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Jul 2014 04:20:13 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2014-07-08T04:20:13Z</dc:date>
    <item>
      <title>Confusion in example for KE watchdog</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Confusion-in-example-for-KE-watchdog/m-p/317139#M14021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With reference to the KE02 manual - the watchdog example code is given as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_8.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44846iB01C7E23E062B3EF/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_8.png" alt="pastedImage_8.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This however gives a watchdog timeout of &lt;SPAN style="text-decoration: underline;"&gt;59.395 seconds&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason for this is also given in the manual:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44847i4197079F873CFEED/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code should therefore be either&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WDOG_TOVALH = (unsigned char )(1000 &amp;gt;&amp;gt; 8);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WDOG_TOVALL = (unsigned char )(1000);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or &lt;STRONG&gt;WDOG_TOVAL = (unsigned short)((1000 &amp;gt;&amp;gt; 8) | (1000 &amp;lt;&amp;lt; 8));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and then does give the advertised 1s timeout.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 04:20:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Confusion-in-example-for-KE-watchdog/m-p/317139#M14021</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2014-07-08T04:20:13Z</dc:date>
    </item>
  </channel>
</rss>

