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.

[参考译文] TM4C129XNCZAD:CCS 10的看门狗初始化问题

Guru**** 2403135 points


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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1019957/tm4c129xnczad-watchdog-initialisation-problem-with-ccs-10

器件型号:TM4C129XNCZAD

我无法 在  CCS 10.2.1中启用看门狗计时器  

在 CCS 6中使用相同  硬件的代码。

看门狗的初始化代码

看门狗解锁(WATCHDOG0_BASE);
IntPrioritySet (INT_Watchdog、0);
WatchdogIntRegister (WATCHDOG0_BASE、&WatchdogIntHandler);
//
//设置看门狗计时器的周期。
//
WatchdogReloadSet (WATCHDOG0_BASE、SysCtlClockGet ());

//
//启用从看门狗计时器生成的复位。
//
WatchdogResetEnable (WATCHDOG0_BASE);

//
//启用看门狗计时器。
//
WatchdogEnable (WATCHDOG0_BASE);

控制器开始重新启动

无效
看门狗 IntHandler (空)

// if (cycle>=10){
//返回;
//}
十进制转换为 ASCII (cycle、2);
// UARTCharPut (UART0_BASE、A_ASCII[0]);
// UARTCharPut (UART0_BASE、A_ASCII[1]);
// UARTCharPut (UART0_BASE、(CYCLE + 0x30));
WatchdogIntClear (WATCHDOG0_BASE);
// cycle++;

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

    您好、Uday、

    您未启用看门狗中断:

        //
        // Enable the watchdog interrupt.
        //
        IntEnable(INT_WATCHDOG);

    此致、

    Ralph