void PerformPRCMDeepSleepWDTWakeup()
{
//
// Initialize the WDT, Clock is halved in DeepSleep
//
WDT_IF_Init(AppWDTCallBackHandler, (2 * SYS_CLK));
//
// Enable the Sleep Clock
//
MAP_PRCMPeripheralClkEnable(PRCM_WDT, PRCM_DSLP_MODE_CLK);
//
// Enter DEEPSLEEP...WaitForInterrupt ARM intrinsic
//
DBG_PRINT("WDT_DEEPSLEEP: Entering Deep Sleep\n\r");
MAP_UtilsDelay(80000);
MAP_PRCMDeepSleepEnter();
DBG_PRINT("WDT_DEEPSLEEP: Exiting Deep Sleep\n\r");
//
// Disable the DeepSleep Clock
//
MAP_PRCMPeripheralClkDisable(PRCM_WDT, PRCM_DSLP_MODE_CLK);
void PerformPRCMDeepSleepGPTWakeup()
{
//
// Power On the GPT
//
MAP_PRCMPeripheralClkEnable(PRCM_TIMERA0, PRCM_RUN_MODE_CLK);
//
// Initialize the GPT as One Shot timer, Clock is halved in DeepSleep
//
Timer_IF_Init(PRCM_TIMERA0, TIMERA0_BASE, TIMER_CFG_ONE_SHOT, TIMER_BOTH, 0);
Timer_IF_IntSetup(TIMERA0_BASE, TIMER_BOTH, AppGPTCallBackHandler);
//
// Start timer with value in mSec
//
Timer_IF_Start(TIMERA0_BASE, TIMER_BOTH, 4000);
//
// Enable the DeepSleep Clock
//
MAP_PRCMPeripheralClkEnable(PRCM_TIMERA0, PRCM_DSLP_MODE_CLK);
//
// Enter DEEPSLEEP...WaitForInterrupt ARM intrinsic
//
DBG_PRINT("GPT_DEEPSLEEP: Entering Deep Sleep\n\r");
MAP_UtilsDelay(80000);
PRCMDeepSleepEnter();
DBG_PRINT("GPT_DEEPSLEEP: Exiting Deep Sleep\n\r");
//
// Disable the DeepSleep Clock
//
MAP_PRCMPeripheralClkDisable(PRCM_TIMERA0, PRCM_DSLP_MODE_CLK);
//
// Deinitialize the GPT
//
Timer_IF_Stop(TIMERA0_BASE, TIMER_BOTH);
Timer_IF_DeInit(TIMERA0_BASE, TIMER_BOTH);
感谢分享