Skip to content

Instantly share code, notes, and snippets.

@monpetit
Last active August 29, 2015 14:23
Show Gist options
  • Select an option

  • Save monpetit/7d0722a398556915fc97 to your computer and use it in GitHub Desktop.

Select an option

Save monpetit/7d0722a398556915fc97 to your computer and use it in GitHub Desktop.
#include "inc/hw_types.h"
#include "driverlib/prcm.h"
#include "driverlib/wdt.h"
void wdt_reset(void)
{
// Watchdog 활성화, clock source 지정
MAP_PRCMPeripheralClkEnable(PRCM_WDT, PRCM_RUN_MODE_CLK);
// WDT 레지스터 잠금 해제
MAP_WatchdogUnlock(WDT_BASE);
// WDT reload value 설정
MAP_WatchdogReloadSet(WDT_BASE, 10);
// WDT 시작
MAP_WatchdogEnable(WDT_BASE);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment