问题1, 文档的意思应该是如果对看门狗的寄存器 WDKEY 先写0X55 再写0XAA,55 为重启使能 AA 为清零计数器,这样就能避免看门狗复位;WDKEY写其他值则没有效果
如下为TI 的官方程序:
//---------------------------------------------------------------------------
// Example: ServiceDog:
//---------------------------------------------------------------------------
// This function resets the watchdog timer.
// Enable this function for using ServiceDog in the application
如下为TI 的官方程序:
//---------------------------------------------------------------------------
// Example: ServiceDog:
//---------------------------------------------------------------------------
// This function resets the watchdog timer.
// Enable this function for using ServiceDog in the application
void ServiceDog(void)
{
EALLOW;
WdRegs.WDKEY.bit.WDKEY = 0x0055;
WdRegs.WDKEY.bit.WDKEY = 0x00AA;
EDIS;
}
一周热门 更多>