<?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: KL15 Watchdog not working in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL15-Watchdog-not-working/m-p/315448#M13816</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Xavier&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First line in the KL15P80M48SF0RM.pdf User's Manual describing the register:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="COP.PNG.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44397i1C6A6F28A53B9CD7/image-size/large?v=v2&amp;amp;px=999" role="button" title="COP.PNG.png" alt="COP.PNG.png" /&gt;&lt;/span&gt;&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>Sun, 08 Jun 2014 13:18:02 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2014-06-08T13:18:02Z</dc:date>
    <item>
      <title>KL15 Watchdog not working</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL15-Watchdog-not-working/m-p/315443#M13811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Freescale Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently developing on KL15 microcontroller, Bareboard without PE. As required, I would like to enable watchdog timer for security reasons. Right now I am running a small testing program with watchdog timer enabled at the starting of the main and do not feed anything to it. I expect that the program resets itself frequently. However, the program runs per normal. It looks like the watchdog is never enabled. I am attaching my code for reference. Hope I can get some help in clearing my doubts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1402218733890553" jivemacro_uid="_1402218733890553" modifiedtitle="true"&gt;
&lt;P&gt;void __init_hardware()&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; SCB_VTOR = (uint32_t)__vector_table; /* Set the interrupt vector table position */&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; // Disable the Watchdog because it may reset the core before entering main().&lt;/P&gt;
&lt;P&gt;&amp;nbsp; SIM_COPC = KINETIS_WDOG_DISABLED_CTRL;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;void WDG_Enable()&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; SIM_COPC = (0x08 &amp;amp; 0x0F); // Enable the clock and the timeout count&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;void SysInit()&lt;/P&gt;
&lt;P&gt;{&amp;nbsp; /* Enable the COM Port UART with minimal settings */&lt;/P&gt;
&lt;P&gt;&amp;nbsp; UART0Init(9600);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; UART0HWFCPinInit();&lt;/P&gt;
&lt;P&gt;&amp;nbsp; UART1Init(9600);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; UART1HWFCPinInit();&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; /* Initialize the WatchDog */&lt;/P&gt;
&lt;P&gt;&amp;nbsp; WDG_Enable();&lt;/P&gt;
&lt;P&gt;&amp;nbsp; COMSendString("\r\nWDG Enabled");&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;void EnvInit()&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; /* Create the tasks here */&lt;/P&gt;
&lt;P&gt;&amp;nbsp; CreateComTasks((configMAX_PRIORITIES-2)); // Create the COM task&lt;/P&gt;
&lt;P&gt;&amp;nbsp; CreateModemTask((configMAX_PRIORITIES-2)); // Create the Modem Task&lt;/P&gt;
&lt;P&gt;&amp;nbsp; CreateUpdateTask((configMAX_PRIORITIES-1)); // Firmware Update task with the default source as COM port&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; /* Create the Semaphores related with UART1 and UART0 */&lt;/P&gt;
&lt;P&gt;&amp;nbsp; CreateUART1Sem();&lt;/P&gt;
&lt;P&gt;&amp;nbsp; CreateUART0Sem();&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;int main()&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; /* Initialize the peripherals and GPIO in here */&lt;/P&gt;
&lt;P&gt;&amp;nbsp; SysInit();&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; /* Initialize the environment */&lt;/P&gt;
&lt;P&gt;&amp;nbsp; EnvInit();&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; vTaskStartScheduler();&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; return 0;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;




&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2014 10:28:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL15-Watchdog-not-working/m-p/315443#M13811</guid>
      <dc:creator>xaviermao</dc:creator>
      <dc:date>2014-06-06T10:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: KL15 Watchdog not working</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL15-Watchdog-not-working/m-p/315444#M13812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You mention that you expect continuously reset from your target device with this small test code but I am not sure about how you want to make this happen, I really would like to check your project if you want to share it.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a nice day,&lt;BR /&gt;Perla Moncada&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>Sat, 07 Jun 2014 18:17:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL15-Watchdog-not-working/m-p/315444#M13812</guid>
      <dc:creator>perlam_i_au</dc:creator>
      <dc:date>2014-06-07T18:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: KL15 Watchdog not working</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL15-Watchdog-not-working/m-p/315445#M13813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;SIM_COPC&lt;/STRONG&gt; register can only be written once after a reset. This means that, since you are immediately disabling it, you can not enable it again later.&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>Sat, 07 Jun 2014 19:14:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL15-Watchdog-not-working/m-p/315445#M13813</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2014-06-07T19:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: KL15 Watchdog not working</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL15-Watchdog-not-working/m-p/315446#M13814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Moncada,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply. I have updated the code in my previous question statement for your reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, the project runs with FreeRTOS. inside the main(), after certain initialization including enable watchdog timer, it starts the task scheduler. The watchdog timer is enabled inside SysInit() as showing and a debug message is printed after that. The watchdog timer is never fed again after this initialization. If the watchdog timer timeout, I expect a reset of the system and hence repeating of the debug message. But the system runs as normal. The debugging message is not repeated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you! Hope to hear from you soon.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jun 2014 09:05:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL15-Watchdog-not-working/m-p/315446#M13814</guid>
      <dc:creator>xaviermao</dc:creator>
      <dc:date>2014-06-08T09:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: KL15 Watchdog not working</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL15-Watchdog-not-working/m-p/315447#M13815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To my understanding, watchdog time should be able to be enabled in run time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;This means that, since you are immediately disabling it, you can not enable it again later.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;Can you provide some reference for the above information? I cannot find it stated anywhere.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jun 2014 13:12:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL15-Watchdog-not-working/m-p/315447#M13815</guid>
      <dc:creator>xaviermao</dc:creator>
      <dc:date>2014-06-08T13:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: KL15 Watchdog not working</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL15-Watchdog-not-working/m-p/315448#M13816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Xavier&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First line in the KL15P80M48SF0RM.pdf User's Manual describing the register:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="COP.PNG.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44397i1C6A6F28A53B9CD7/image-size/large?v=v2&amp;amp;px=999" role="button" title="COP.PNG.png" alt="COP.PNG.png" /&gt;&lt;/span&gt;&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>Sun, 08 Jun 2014 13:18:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL15-Watchdog-not-working/m-p/315448#M13816</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2014-06-08T13:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: KL15 Watchdog not working</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL15-Watchdog-not-working/m-p/315449#M13817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are right, I miss understood the statement. I thought it can be written multiple times, but immediately after a reset. Previously I tested without disabling watchdog timer in my program but it was not working. It turned out that SIM_COPC was assigned to 0x00 in the device bootloader. As a result, it was always disabled no matter what I do in my program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for pointing out it !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Xavier&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jun 2014 15:15:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL15-Watchdog-not-working/m-p/315449#M13817</guid>
      <dc:creator>xaviermao</dc:creator>
      <dc:date>2014-06-08T15:15:47Z</dc:date>
    </item>
  </channel>
</rss>

