WDOG1 keeps counting while debugging. Why?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

WDOG1 keeps counting while debugging. Why?

ソリューションへジャンプ
770件の閲覧回数
bp1979
Senior Contributor I

Hi,

Why is the WDOG1 still counting back to zero while I am debugging?

Also in the WDOG SDK example, I experience the same problem.

 

        /*
         * wdogConfig->enableWdog = true;
         * wdogConfig->workMode.enableWait = true;
         * wdogConfig->workMode.enableStop = false;
         * wdogConfig->workMode.enableDebug = false;
         * wdogConfig->enableInterrupt = false;
         * wdogConfig->enablePowerdown = false;
         * wdogConfig->resetExtension = flase;
         * wdogConfig->timeoutValue = 0xFFU;
         * wdogConfig->interruptTimeValue = 0x04u;
         */
        WDOG_GetDefaultConfig(&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, &config);

        PRINTF("--- I add a breakpoint here, wait for >10 seconds and WDOG triggers ---\r\n");

Read the last statement in the snippet above. I added a breakpoint there. After 10+ sec the watchdog triggers.

Shouldn't this take care of that?

* wdogConfig->workMode.enableDebug = false;

snippet from fsl_wdog impl

void WDOG_GetDefaultConfig(wdog_config_t *config)
{
    assert(NULL != config);

    /* Initializes the configure structure to zero. */
    (void)memset(config, 0, sizeof(*config));

    config->enableWdog             = true;
    config->workMode.enableWait    = false;
    config->workMode.enableStop    = false;
    config->workMode.enableDebug   = false;
    config->enableInterrupt        = false;
    config->softwareResetExtension = false;
    config->enablePowerDown        = false;
    config->timeoutValue           = 0xffu;
    config->interruptTimeValue     = 0x04u;
    config->enableTimeOutAssert    = false;
}
0 件の賞賛
1 解決策
757件の閲覧回数
bp1979
Senior Contributor I

Hi @kerryzhou 

Nah, that's not true. 

bp1979_1-1631262833021.png

A Guide to Watchdog Timers for Embedded Systems | Interrupt (memfault.com)

Nevermind, found it myself

bp1979_0-1631262624146.png

when I set the bool to true it works

config.workMode.enableDebug = true;

 

Thanks !

元の投稿で解決策を見る

2 返答(返信)
763件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @bp1979 ,

   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.

  It is the correct result.

Best Regards,

Kerry

0 件の賞賛
758件の閲覧回数
bp1979
Senior Contributor I

Hi @kerryzhou 

Nah, that's not true. 

bp1979_1-1631262833021.png

A Guide to Watchdog Timers for Embedded Systems | Interrupt (memfault.com)

Nevermind, found it myself

bp1979_0-1631262624146.png

when I set the bool to true it works

config.workMode.enableDebug = true;

 

Thanks !