void WakeUp_Timer_ISR (void) interrupt 17 //ISR for self wake-up timer
{
clr_WKCON_WKTF; //clear interrupt flag
P31 ^= 1;
}
void main (void)
{
MFP_P31_GPIO;
P31_PUSHPULL_MODE;
/**
WKT initial part
*include wkt.c
*/
WKT_Open(LXT,64,0x10);
WKT_Interrupt(Enable); // Enable WKT interrupt
ENABLE_GLOBAL_INTERRUPT; // Enable Globe interrupt
while (1)
{
set_PCON_PD; // into power down mode to check WKT wake up function.
}
}
|