Other Parts Discussed in Thread: CC3220SF
Tool/software: Code Composer Studio
Ok, i just found a code an do like this:
#define NOT_ACTIVE_DURATION_MSEC (60000) /* 60 seconds */ #define LPDS_IDLE_TIME (60000) /* 60 seconds */ void gpioButtonFxn1(uint8_t index) { UART_PRINT("\n\rWoke up from GPIO button .. \n\r"); return; } void *Power_on_switcher(void) { int32_t status = 0; int16_t slStarted = 0; ClockP_Params lpdsParams; // init gpio for leds and buttons // will include for PRODUCTION code Board_initGPIO(); Board_initSPI(); /* Configure the UART. Options in the */ // TEST code InitTerm(); PowerCC32XX_Wakeup wakeup; PowerCC32XX_getWakeup(&wakeup); wakeup.wakeupGPIOFxnLPDS = gpioButtonFxn1; PowerCC32XX_configureWakeup(&wakeup); Power_enablePolicy(); /* install Button callback and enable it */ GPIO_setCallback(Board_GPIO_BUTTON1, gpioButtonFxn1); GPIO_enableInt(Board_GPIO_BUTTON1); /* Turn on user LED */ GPIO_write(Board_LED0, Board_LED_ON); powerShutdown(NOT_ACTIVE_DURATION_MSEC); }
every minute write "i am alive' and go hib.
but, when i push button is nothing happen! it have to write "oke up from GPIO button"
where i am wrong?