This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSPM0G3507: WWDT debug fail

Part Number: MSPM0G3507

Tool/software:

Hi,

   I set timer0=400ms period.

   wwtd config is:

My current phenomenon is: when DL-WWDT_restart (WWDT0-INST); When placed in main, an exception occurred during online debugging:

    

#include "ti_msp_dl_config.h"
uint8_t flag = 0;
int main(void)
{
    SYSCFG_DL_init();

    /* Enable TimerG interrupts on device */
    NVIC_EnableIRQ(TIMER_0_INST_INT_IRQN);

    /* Enable sleep on exit */
    DL_SYSCTL_enableSleepOnExit();

    /* Set LED to indicate Timer counter enable */
    DL_GPIO_clearPins(
        GPIO_LEDS_PORT, GPIO_LEDS_USER_LED_1_PIN | GPIO_LEDS_USER_TEST_PIN);

    /* Start TimerG counter */
    DL_TimerG_startCounter(TIMER_0_INST);

    while (1) {
        //__WFI();
        //delay_cycles(1000000);
        if(flag)
        {
            flag = 0;
            DL_WWDT_restart(WWDT0_INST);
        }
    }
}

void TIMER_0_INST_IRQHandler(void)
{
    switch (DL_TimerG_getPendingInterrupt(TIMER_0_INST)) {
        case DL_TIMER_IIDX_ZERO:
            /* Restart WWDT timer */
            //DL_WWDT_restart(WWDT0_INST);
            flag = 1;
            /* Toggle LED to indicate WWDT reset */
            DL_GPIO_togglePins(GPIO_LEDS_PORT,
                GPIO_LEDS_USER_LED_1_PIN | GPIO_LEDS_USER_TEST_PIN);
            break;
        default:
            break;
    }
}