hi
I want to acheive this:button pressed,enter standby;loosen button,exit standby.
My code is below:
void buttonCallbackFxn(PIN_Handle handle, PIN_Id pinId)
{
CPUdelay(8000*50);
if (!PIN_getInputValue(Board_BUTTON0))
{
Power_sleep(PowerCC26XX_STANDBY);
}
}
static void taskFxn(UArg a0, UArg a1)
{
PIN_setConfig(buttonPinHandle, PIN_BM_IRQ, Board_BUTTON0 | PIN_IRQ_BOTHEDGES);
PIN_setConfig(buttonPinHandle, PINCC26XX_BM_WAKEUP, Board_BUTTON0 | PIN_IRQ_POSEDGE);
while(1);
}
first of all, enable PIN interrupt as both edge, and configure posedge as wakeup.
In fact,when button pressed the first time,the current is about X uA, then loose button, current is X mA.and then press button the second time, the current is still mA, it means cannot enter standby mode the second time.!
This is strange, does any one know what is wrong with this??
Thank you !