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.

[参考译文] LP-MSPM0G3507:WDT 错误

Guru**** 1800230 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1407465/lp-mspm0g3507-wdt-error

器件型号:LP-MSPM0G3507

工具与软件:

#include "ti_msp_dl_config.h"

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();
    }
}

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);

            /* 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;
    }
}

大家好、我在根本不更改 WDT 样本代码的情况下更改周期计数时会遇到此类错误。 解决方案是什么?或者我做得有问题吗?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    您遇到了什么错误? 您是否能够在此处显示错误消息?