Hi everyone,
I am new in this forum. I have been working on cc2538 for few weeks. Now iam facing issue on Power modes.
After entering to PM1 , its not waking up. But on debug mode, its waking up by halting.
My sleep mode initialization code is,
void SleepModeInit (void)
{
halIntOff();
SysCtrlPowerModeSet(SYS_CTRL_PM_1);
SysCtrlPeripheralSleepEnable(SYS_CTRL_PERIPH_UART0 | SYS_CTRL_PERIPH_RFC);
SleepModeTimerCompareSet(SleepModeTimerCountGet()+37238);
GPIOIntWakeupEnable(GPIO_IWE_PORT_C | GPIO_IWE_SM_TIMER);
GPIOPowIntTypeSet(SW_DIR_BASE, SW_RAD_IN,GPIO_POW_RISING_EDGE);
GPIOPowIntClear(SW_DIR_BASE, SW_RAD_IN);
GPIOPowIntEnable(SW_DIR_BASE, SW_RAD_IN);
IntPrioritySet(INT_GPIOC, 0);
IntPrioritySet(INT_SMTIM, 1);
IntPrioritySet(INT_UART0, 2);
halIntOn();
SysCtrlSleep();
GPIOPowIntDisable(SW_DIR_BASE, SW_RAD_IN);
}
I am using z-stack on IAR. I have used GPIO interrupt, sleep timer and UART interrupt to wake-up, but still in vain. The sleep timer also stops running in PM1.
I have seen similar post in the forum, but it is also not well replied.
So please point out my mistake.
Thanks in advance.