Quantcast
Channel: MSP 低功耗微控制器论坛 - 最近的话题
Viewing all articles
Browse latest Browse all 3781

MSP430I2021: 程序开始时初始化 看门狗, 在while循环中喂狗, 为什么程序还是重启

$
0
0
Part Number: MSP430I2021

int main()

{

    WDTCTL = WDTPW | WDTHOLD;   // stop watchdog timer

   //初始化看门狗
   WDTCTL = WDT_ARST_1000; // Set Watchdog Timer timeout 1s
   

   while(1)

   {

      //喂狗
       WDTCTL = WDTPW | WDTCNTCL;

   }

}


Viewing all articles
Browse latest Browse all 3781

Trending Articles