<?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: Watchdog on KL24z in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-on-KL24z/m-p/358003#M17997</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jorge, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;I am using CW with MQX lite. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried configuring the watchdog a few ways. First, I tried through processor expert and using the watchdog_LDD, but that didn't seem to work at all. Secondly, I tried by just modifying the registers. In this second case I am using SIM_COPC = 0xE; to setup the watchdog timer. Then, using SIM_SRVCOP = 0x55; SIM_SRVCOP = 0xAA; to clear the watchdog timer. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I started with an example project a while ago, but have written a ton of code around it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know if a watchdog will solve my problem or not though. I just wanted to try it and see if it would work. My main issue is that I have a state machine in a task and the state machine is getting stuck in a state. It doesn't get stuck every time, just randomly. This is a battery powered application so I go to sleep after the state machine is done, so I can't every troubleshoot and see where the code is getting stuck. It never gets stuck the first time through the state machine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you need any more info for my application. I have 50 units out at a customers site and not all of them have froze, but a majority of them have. :smileysad: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Mar 2015 16:23:30 GMT</pubDate>
    <dc:creator>mikeconover</dc:creator>
    <dc:date>2015-03-04T16:23:30Z</dc:date>
    <item>
      <title>Watchdog on KL24z</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-on-KL24z/m-p/358001#M17995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Has anyone ever been able to get the watchdog to work on the KL24z? &lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Every time I try and run the processor it goes into the statement below which is in boot.S. Has anyone seen this problem before?&amp;nbsp; &lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;/* Disable interrupts and clear pending flags */&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldr r0, =0xFFFFFFFF&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Thanks,&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 16:02:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-on-KL24z/m-p/358001#M17995</guid>
      <dc:creator>mikeconover</dc:creator>
      <dc:date>2015-03-04T16:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: Watchdog on KL24z</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-on-KL24z/m-p/358002#M17996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mike Conover:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please provide more details about your issue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- What IDE are you using (CW, KDS, IAR, Keil)?&lt;/P&gt;&lt;P&gt;- How are you configuring the Watchdog?&lt;/P&gt;&lt;P&gt;- Is this code from a new project created by you or an example project?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general any context information that helps us understand your issue and provide feedback.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 16:15:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-on-KL24z/m-p/358002#M17996</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2015-03-04T16:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: Watchdog on KL24z</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-on-KL24z/m-p/358003#M17997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jorge, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;I am using CW with MQX lite. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried configuring the watchdog a few ways. First, I tried through processor expert and using the watchdog_LDD, but that didn't seem to work at all. Secondly, I tried by just modifying the registers. In this second case I am using SIM_COPC = 0xE; to setup the watchdog timer. Then, using SIM_SRVCOP = 0x55; SIM_SRVCOP = 0xAA; to clear the watchdog timer. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I started with an example project a while ago, but have written a ton of code around it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know if a watchdog will solve my problem or not though. I just wanted to try it and see if it would work. My main issue is that I have a state machine in a task and the state machine is getting stuck in a state. It doesn't get stuck every time, just randomly. This is a battery powered application so I go to sleep after the state machine is done, so I can't every troubleshoot and see where the code is getting stuck. It never gets stuck the first time through the state machine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you need any more info for my application. I have 50 units out at a customers site and not all of them have froze, but a majority of them have. :smileysad: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 16:23:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-on-KL24z/m-p/358003#M17997</guid>
      <dc:creator>mikeconover</dc:creator>
      <dc:date>2015-03-04T16:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Watchdog on KL24z</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-on-KL24z/m-p/358004#M17998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are those the correct commands to start the watchdog and keep it going? Also, I commented out the code where processor expert writes to the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SIM_COPC register because you can only update that register once after a reset. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 18:12:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-on-KL24z/m-p/358004#M17998</guid>
      <dc:creator>mikeconover</dc:creator>
      <dc:date>2015-03-04T18:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Watchdog on KL24z</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-on-KL24z/m-p/358005#M17999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mike:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the delay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure what is causing your application to crash, but regarding watchdog, I attached a simple project for KL24 with MQX_Lite and the Watchdog_LDD component. You may give it a check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some comments:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1)&lt;/STRONG&gt; The file boot.S you mentioned above is actually the MQX entry point. This means that the watchdog was timing out.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2)&lt;/STRONG&gt; From the CPU component, set the property "Watchdog disable" to &lt;STRONG&gt;no&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;IMG alt="pastedImage_3.png" src="https://community.nxp.com/t5/image/serverpage/image-id/51136iE647D771E4CD1545/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_3.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3)&lt;/STRONG&gt; From either of your tasks you have to refresh the Watchdog by calling the WDog_Clear() method as in the attached project:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_14256914959417948 jive_macro_code" jivemacro_uid="_14256914959417948"&gt;
&lt;P&gt;void Task1_task(uint32_t task_init_data)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; int counter = 0;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; while(1) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; counter++;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Write your code here ... */&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WDog1_Clear(WDog1_DeviceData);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4)&lt;/STRONG&gt; If you comment out the Clear method, then you will see the execution restarting from boot.S.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About your question, your configuration seems correct. You can inspect PEx generated Watchdog code and confirm it is actually the same at least for the refresh part.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you have doubts.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards!,&lt;BR /&gt;Jorge Gonzalez&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 13:12:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-on-KL24z/m-p/358005#M17999</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2020-11-02T13:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Watchdog on KL24z</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-on-KL24z/m-p/358006#M18000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Jorge. I think my issue is with the MQX lite. It is like the task is getting stuck in the idle state or something. I have not been able to figure out the problem. Thanks for your help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 19:51:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-on-KL24z/m-p/358006#M18000</guid>
      <dc:creator>mikeconover</dc:creator>
      <dc:date>2015-03-10T19:51:01Z</dc:date>
    </item>
  </channel>
</rss>

