<?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>Kinetis MicrocontrollersのトピックRe: How do I enable the WatchDog/COP? MKL27Z256</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-I-enable-the-WatchDog-COP-MKL27Z256/m-p/652654#M39760</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes very helpful, The code line DISABLE_WDOG=0 will get warning message. I add a line in the file system_MKL27Z644.H right below #include &amp;lt;stdint&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;stdint.h&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#define DISABLE_WDOG&amp;nbsp; &amp;nbsp;0&amp;nbsp; //added&amp;nbsp; for use watchdog timer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#ifndef DISABLE_WDOG&lt;BR /&gt; #define DISABLE_WDOG 1&lt;BR /&gt;#endif&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Nov 2018 18:43:11 GMT</pubDate>
    <dc:creator>albert_zhou</dc:creator>
    <dc:date>2018-11-19T18:43:11Z</dc:date>
    <item>
      <title>How do I enable the WatchDog/COP? MKL27Z256</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-I-enable-the-WatchDog-COP-MKL27Z256/m-p/652652#M39758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using&amp;nbsp;MKL27Z256, 32 pin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cop_config_t cop_config;&lt;/P&gt;&lt;P&gt;COP_HAL_Init( SIM );&lt;BR /&gt; cop_config.copClockSource = kCopLpoClock;&lt;BR /&gt; cop_config.copDebugModeEnable = false;&lt;BR /&gt; cop_config.copStopModeEnable = false;&lt;BR /&gt; cop_config.copTimeout = kCopTimeout_short_2to10_or_long_2to18;&lt;BR /&gt; cop_config.copTimeoutMode = kCopShortTimeoutMode;&lt;BR /&gt; cop_config.copWindowModeEnable = false;&lt;BR /&gt; COP_HAL_SetConfig( SIM, &amp;amp;cop_config );&lt;BR /&gt; COP_HAL_Enable();&lt;BR /&gt; COP_HAL_Refresh( SIM );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this code starting up late after I initialized my entire program. For some reason, I cannot get the COPC register in the SIM module to reflect the changes made above. When I'm in the debug mode and monitoring the SIM module, COPC registers are never changed and stay at 0. I cannot manually change these values within the debugger either, they instantly snap back to zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I'm out of debug mode and lock the main() application, the COP never resets the system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a special sequence that I must do to modify these values? Any help would be appreciated. I am using KSDK1.3 and using the HAL layer only.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 19:06:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-I-enable-the-WatchDog-COP-MKL27Z256/m-p/652652#M39758</guid>
      <dc:creator>ericbergstedt</dc:creator>
      <dc:date>2016-11-11T19:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I enable the WatchDog/COP? MKL27Z256</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-I-enable-the-WatchDog-COP-MKL27Z256/m-p/652653#M39759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To enable the watchdog I had to add the follow type define to my Preprocessor Symbols&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DISABLE_WDOG=0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inside of &lt;STRONG&gt;SystemInit()&lt;/STRONG&gt; there is a define that will automatically disable the watch dog by default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inside of "&lt;STRONG&gt;system_MKL27Z4.h&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;There exists this little bit of code&lt;/P&gt;&lt;P&gt;&lt;EM&gt;#ifndef DISABLE_WDOG&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; #define DISABLE_WDOG 1&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#endif&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then inside of "&lt;STRONG&gt;startup_MKL27Z4.h&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;void SystemInit (void) {&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;#if (DISABLE_WDOG)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; /* SIM-&amp;gt;COPC: ?=0,COPCLKSEL=0,COPDBGEN=0,COPSTPEN=0,COPT=0,COPCLKS=0,COPW=0 */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; SIM-&amp;gt;COPC = (uint32_t)0x00u;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#endif /* (DISABLE_WDOG) */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Writing to the Watchdog/COP is a write once register from start up, the above code will take up that one time write far before your application will have a chance to write to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function is called by the Reset_Handler inside of "startup_MKL27Z4.s", which is called before the program even reaches main().&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2016 00:47:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-I-enable-the-WatchDog-COP-MKL27Z256/m-p/652653#M39759</guid>
      <dc:creator>ericbergstedt</dc:creator>
      <dc:date>2016-11-15T00:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do I enable the WatchDog/COP? MKL27Z256</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-I-enable-the-WatchDog-COP-MKL27Z256/m-p/652654#M39760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes very helpful, The code line DISABLE_WDOG=0 will get warning message. I add a line in the file system_MKL27Z644.H right below #include &amp;lt;stdint&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;stdint.h&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#define DISABLE_WDOG&amp;nbsp; &amp;nbsp;0&amp;nbsp; //added&amp;nbsp; for use watchdog timer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#ifndef DISABLE_WDOG&lt;BR /&gt; #define DISABLE_WDOG 1&lt;BR /&gt;#endif&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2018 18:43:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-I-enable-the-WatchDog-COP-MKL27Z256/m-p/652654#M39760</guid>
      <dc:creator>albert_zhou</dc:creator>
      <dc:date>2018-11-19T18:43:11Z</dc:date>
    </item>
  </channel>
</rss>

