<?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>i.MX RT Crossover MCUsのトピックWDOG1 keeps counting while debugging. Why?</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/WDOG1-keeps-counting-while-debugging-Why/m-p/1337655#M16253</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Why is the WDOG1 still counting back to zero while I am debugging?&lt;/P&gt;&lt;P&gt;Also in the WDOG SDK example, I experience the same problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;        /*
         * wdogConfig-&amp;gt;enableWdog = true;
         * wdogConfig-&amp;gt;workMode.enableWait = true;
         * wdogConfig-&amp;gt;workMode.enableStop = false;
         * wdogConfig-&amp;gt;workMode.enableDebug = false;
         * wdogConfig-&amp;gt;enableInterrupt = false;
         * wdogConfig-&amp;gt;enablePowerdown = false;
         * wdogConfig-&amp;gt;resetExtension = flase;
         * wdogConfig-&amp;gt;timeoutValue = 0xFFU;
         * wdogConfig-&amp;gt;interruptTimeValue = 0x04u;
         */
        WDOG_GetDefaultConfig(&amp;amp;config);
        config.timeoutValue       = 0xFU; /* Timeout value is (0xF+1)/2 = 8 sec. */
        config.enableInterrupt    = true;
        config.interruptTimeValue = 0x4U; /* Interrupt occurred (0x4)/2 = 2 sec before WDOG timeout. */
        WDOG_Init(DEMO_WDOG_BASE, &amp;amp;config);

        PRINTF("--- I add a breakpoint here, wait for &amp;gt;10 seconds and WDOG triggers ---\r\n");&lt;/LI-CODE&gt;&lt;P&gt;Read the last statement in the snippet above. I added a breakpoint there. After 10+ sec the watchdog triggers.&lt;/P&gt;&lt;P&gt;Shouldn't this take care of that?&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;* wdogConfig-&amp;gt;workMode.enableDebug = false;&lt;/LI-CODE&gt;&lt;P&gt;snippet from fsl_wdog impl&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;void WDOG_GetDefaultConfig(wdog_config_t *config)
{
    assert(NULL != config);

    /* Initializes the configure structure to zero. */
    (void)memset(config, 0, sizeof(*config));

    config-&amp;gt;enableWdog             = true;
    config-&amp;gt;workMode.enableWait    = false;
    config-&amp;gt;workMode.enableStop    = false;
    config-&amp;gt;workMode.enableDebug   = false;
    config-&amp;gt;enableInterrupt        = false;
    config-&amp;gt;softwareResetExtension = false;
    config-&amp;gt;enablePowerDown        = false;
    config-&amp;gt;timeoutValue           = 0xffu;
    config-&amp;gt;interruptTimeValue     = 0x04u;
    config-&amp;gt;enableTimeOutAssert    = false;
}&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 09 Sep 2021 09:51:32 GMT</pubDate>
    <dc:creator>bp1979</dc:creator>
    <dc:date>2021-09-09T09:51:32Z</dc:date>
    <item>
      <title>WDOG1 keeps counting while debugging. Why?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/WDOG1-keeps-counting-while-debugging-Why/m-p/1337655#M16253</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Why is the WDOG1 still counting back to zero while I am debugging?&lt;/P&gt;&lt;P&gt;Also in the WDOG SDK example, I experience the same problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;        /*
         * wdogConfig-&amp;gt;enableWdog = true;
         * wdogConfig-&amp;gt;workMode.enableWait = true;
         * wdogConfig-&amp;gt;workMode.enableStop = false;
         * wdogConfig-&amp;gt;workMode.enableDebug = false;
         * wdogConfig-&amp;gt;enableInterrupt = false;
         * wdogConfig-&amp;gt;enablePowerdown = false;
         * wdogConfig-&amp;gt;resetExtension = flase;
         * wdogConfig-&amp;gt;timeoutValue = 0xFFU;
         * wdogConfig-&amp;gt;interruptTimeValue = 0x04u;
         */
        WDOG_GetDefaultConfig(&amp;amp;config);
        config.timeoutValue       = 0xFU; /* Timeout value is (0xF+1)/2 = 8 sec. */
        config.enableInterrupt    = true;
        config.interruptTimeValue = 0x4U; /* Interrupt occurred (0x4)/2 = 2 sec before WDOG timeout. */
        WDOG_Init(DEMO_WDOG_BASE, &amp;amp;config);

        PRINTF("--- I add a breakpoint here, wait for &amp;gt;10 seconds and WDOG triggers ---\r\n");&lt;/LI-CODE&gt;&lt;P&gt;Read the last statement in the snippet above. I added a breakpoint there. After 10+ sec the watchdog triggers.&lt;/P&gt;&lt;P&gt;Shouldn't this take care of that?&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;* wdogConfig-&amp;gt;workMode.enableDebug = false;&lt;/LI-CODE&gt;&lt;P&gt;snippet from fsl_wdog impl&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;void WDOG_GetDefaultConfig(wdog_config_t *config)
{
    assert(NULL != config);

    /* Initializes the configure structure to zero. */
    (void)memset(config, 0, sizeof(*config));

    config-&amp;gt;enableWdog             = true;
    config-&amp;gt;workMode.enableWait    = false;
    config-&amp;gt;workMode.enableStop    = false;
    config-&amp;gt;workMode.enableDebug   = false;
    config-&amp;gt;enableInterrupt        = false;
    config-&amp;gt;softwareResetExtension = false;
    config-&amp;gt;enablePowerDown        = false;
    config-&amp;gt;timeoutValue           = 0xffu;
    config-&amp;gt;interruptTimeValue     = 0x04u;
    config-&amp;gt;enableTimeOutAssert    = false;
}&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 09 Sep 2021 09:51:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/WDOG1-keeps-counting-while-debugging-Why/m-p/1337655#M16253</guid>
      <dc:creator>bp1979</dc:creator>
      <dc:date>2021-09-09T09:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: WDOG1 keeps counting while debugging. Why?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/WDOG1-keeps-counting-while-debugging-Why/m-p/1338109#M16266</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/189239"&gt;@bp1979&lt;/a&gt;&amp;nbsp;，&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;As you know, the watchdog is the hardware IP module, so, when you enable the WDOG, then the hardware timer will counting, if you don't feed it(refresh the counter), it will be overflow.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; It is the correct result.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Kerry&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 06:15:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/WDOG1-keeps-counting-while-debugging-Why/m-p/1338109#M16266</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2021-09-10T06:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: WDOG1 keeps counting while debugging. Why?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/WDOG1-keeps-counting-while-debugging-Why/m-p/1338263#M16272</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/60336"&gt;@kerryzhou&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nah, that's not true.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bp1979_1-1631262833021.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/155733i984FA41B14C9F82D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bp1979_1-1631262833021.png" alt="bp1979_1-1631262833021.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;bp1979_1-1631262833021.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://interrupt.memfault.com/blog/firmware-watchdog-best-practices#how-does-the-watchdog-behave-with-a-debugger" target="_blank"&gt;A Guide to Watchdog Timers for Embedded Systems | Interrupt (memfault.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Nevermind, found it myself&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bp1979_0-1631262624146.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/155732iE18CA8A6289F524A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bp1979_0-1631262624146.png" alt="bp1979_0-1631262624146.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;bp1979_0-1631262624146.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;when I set the bool to true it works&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;config.workMode.enableDebug = true;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 08:34:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/WDOG1-keeps-counting-while-debugging-Why/m-p/1338263#M16272</guid>
      <dc:creator>bp1979</dc:creator>
      <dc:date>2021-09-10T08:34:25Z</dc:date>
    </item>
  </channel>
</rss>

