<?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: K60 Watchdog reset problem using LPO as clock source in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Watchdog-reset-problem-using-LPO-as-clock-source/m-p/1948104#M66740</link>
    <description>&lt;P&gt;hi,&lt;SPAN&gt;rlEmbi&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for your interest in NXP Semiconductor products and the opportunity to serve you, I will gladly help you with this.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;The twrk60d100m_driver_examples_wdog demo in SDK 2.2.0 describes Watchdog operations.In the demo, the LPO clock 1Khz was used without frequency division, as shown in the figure below.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="XuZhang_0-1725528990146.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/297343iF87B4D089E0C3951/image-size/medium?v=v2&amp;amp;px=400" role="button" title="XuZhang_0-1725528990146.png" alt="XuZhang_0-1725528990146.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I did some tests, using WDOG_Refresh(wdog_base), and then set timeoutValue to 3FF, found that it worked, there was no reset in timeout, I put the code in the attachment, hoping to help you.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="XuZhang_1-1725529023970.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/297344iF1D35F174E5AB3B1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="XuZhang_1-1725529023970.png" alt="XuZhang_1-1725529023970.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Wish it helps you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you still have question about it,please kindly let me know.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Xu Zhang&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Sep 2024 09:40:27 GMT</pubDate>
    <dc:creator>Joey_z</dc:creator>
    <dc:date>2024-09-05T09:40:27Z</dc:date>
    <item>
      <title>K60 Watchdog reset problem using LPO as clock source</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Watchdog-reset-problem-using-LPO-as-clock-source/m-p/1947167#M66738</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We have a board with the K60 processor where we initiate the Watchdog to have one second timeout, and using the&amp;nbsp;&lt;SPAN&gt;LPO Clock Source.&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;const wdog_config_t config = {&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.clockSource = kWDOG_LpoClockSource,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.prescaler = kWDOG_ClockPrescalerDivide1,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.timeoutValue = 1000UL, // 1 sec WD timeout&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.enableWindowMode = false,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.windowValue = 0UL,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.enableUpdate = true,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.enableWdog = true,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.workMode = {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.enableWait = true,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.enableStop = false,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.enableDebug = false},&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.enableInterrupt = false&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;};&lt;/DIV&gt;&lt;DIV&gt;WDOG_Init(WDOG, &amp;amp;config);&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Then we use the NXP function,&amp;nbsp;WDOG_Refresh(WDOG), to reset the watchdog within the timeout.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This doesn't work, the controller enters reset.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;If we change the clock source to&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;kWDOG_AlternateClockSource, and update the .timeout Value to&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;48000000UL, to achieve one second timeout, it works.&lt;BR /&gt;&lt;BR /&gt;Is there any thing we are missing for the LPO Clock Source mode?&lt;BR /&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Code:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;void&lt;/SPAN&gt; &lt;SPAN&gt;WDOG_Refresh&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;WDOG_Type&lt;/SPAN&gt; &lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN&gt;base&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;uint32_t&lt;/SPAN&gt; &lt;SPAN&gt;primaskValue&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;0U&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; /* Disable the global interrupt to protect refresh sequence */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;primaskValue&lt;/SPAN&gt;&lt;SPAN&gt; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;DisableGlobalIRQ&lt;/SPAN&gt;&lt;SPAN&gt;();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;base&lt;/SPAN&gt;&lt;SPAN&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;REFRESH&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;WDOG_FIRST_WORD_OF_REFRESH&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;base&lt;/SPAN&gt;&lt;SPAN&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;REFRESH&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;WDOG_SECOND_WORD_OF_REFRESH&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;EnableGlobalIRQ&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;primaskValue&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;#define&lt;/SPAN&gt; &lt;SPAN&gt;WDOG_FIRST_WORD_OF_REFRESH&lt;/SPAN&gt;&lt;SPAN&gt; &amp;nbsp;(&lt;/SPAN&gt;&lt;SPAN&gt;0xA602U&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt; /*!&amp;lt; First word of refresh sequence */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;#define&lt;/SPAN&gt; &lt;SPAN&gt;WDOG_SECOND_WORD_OF_REFRESH&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;0xB480U&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt; /*!&amp;lt; Second word of refresh sequence */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Then we use the&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;&lt;SPAN&gt;Rolf Lien&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 10:37:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Watchdog-reset-problem-using-LPO-as-clock-source/m-p/1947167#M66738</guid>
      <dc:creator>rlEmbi</dc:creator>
      <dc:date>2024-09-04T10:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: K60 Watchdog reset problem using LPO as clock source</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Watchdog-reset-problem-using-LPO-as-clock-source/m-p/1948104#M66740</link>
      <description>&lt;P&gt;hi,&lt;SPAN&gt;rlEmbi&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for your interest in NXP Semiconductor products and the opportunity to serve you, I will gladly help you with this.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;The twrk60d100m_driver_examples_wdog demo in SDK 2.2.0 describes Watchdog operations.In the demo, the LPO clock 1Khz was used without frequency division, as shown in the figure below.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="XuZhang_0-1725528990146.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/297343iF87B4D089E0C3951/image-size/medium?v=v2&amp;amp;px=400" role="button" title="XuZhang_0-1725528990146.png" alt="XuZhang_0-1725528990146.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I did some tests, using WDOG_Refresh(wdog_base), and then set timeoutValue to 3FF, found that it worked, there was no reset in timeout, I put the code in the attachment, hoping to help you.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="XuZhang_1-1725529023970.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/297344iF1D35F174E5AB3B1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="XuZhang_1-1725529023970.png" alt="XuZhang_1-1725529023970.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Wish it helps you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you still have question about it,please kindly let me know.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Xu Zhang&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 09:40:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Watchdog-reset-problem-using-LPO-as-clock-source/m-p/1948104#M66740</guid>
      <dc:creator>Joey_z</dc:creator>
      <dc:date>2024-09-05T09:40:27Z</dc:date>
    </item>
  </channel>
</rss>

