看门狗如果使用后,计数到0就触发软件复位,那如果软件正常运行,我要怎么样和普通单片机一样清看门狗呢?
Triton Zhang:
你可以调用看门狗的库函数wdogFeed( )进行清狗操作。
user3770609:
回复 Triton Zhang:
为什么在232的看门狗例程中不需要解锁和重新锁定的语句
voidWatchdogIntHandler(void){ // // If we have been told to stop feeding the watchdog, return immediately // without clearing the interrupt. This will cause the system to reset // next time the watchdog interrupt fires. // if(!g_bFeedWatchdog) { return; }
// // Clear the watchdog interrupt. // ROM_WatchdogIntClear(WATCHDOG0_BASE);
// // Invert the GPIO PF3 value. // ROM_GPIOPinWrite(GPIO_PORTG_BASE, GPIO_PIN_2, (ROM_GPIOPinRead(GPIO_PORTG_BASE, GPIO_PIN_2) ^ GPIO_PIN_2));}