Tool/software: TI-RTOS
Hello
I still have the same problem on my projects.
I think the problem is present when there are 2 waking pins.
What I observe: in order for the product to come out of standby, pin 1 must be grounded and there must be a falling edge on pin 2.
I will like a different behavior. I want the product to come out of standby if the pin 1 to a falling edge or pin 2 to a falling edge.
I want to replace the AND with an OR.
Thanks for your help.
best regards
I enclose the code used
#include "gatt.h" #include "gattservapp.h" #include "SensorUtil.h" #include "board.h" #include <ti/drivers/pin/PINCC26XX.h> #include <ti/sysbios/knl/Semaphore.h> #include <ti/sysbios/knl/Task.h> #include "string.h" /********************************************************************* * MACROS */ /********************************************************************* * CONSTANTS */ // Task configuration #define SENSOR_TASK_PRIORITY 1 #define SENSOR_TASK_STACK_SIZE 600 /********************************************************************* * TYPEDEFS */ /********************************************************************* * GLOBAL VARIABLES */ static PIN_Config SensortagAppPinTable[] = { Board_LED1 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */ Board_LED2 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */ Board_KEY_LEFT | PIN_INPUT_EN | PIN_PULLUP | PIN_HYSTERESIS | PINCC26XX_WAKEUP_NEGEDGE, /* Button is active low */ Board_KEY_RIGHT | PIN_INPUT_EN | PIN_PULLUP | PIN_HYSTERESIS | PINCC26XX_WAKEUP_NEGEDGE, /* Button is active low */ PIN_TERMINATE }; PIN_Handle HandleGpioPin; PIN_State PinGpioState; /********************************************************************* * EXTERNAL VARIABLES */ /********************************************************************* * EXTERNAL FUNCTIONS */ /********************************************************************* * LOCAL VARIABLES */ // Task setup static Task_Struct sensorTask; static Char sensorTaskStack[SENSOR_TASK_STACK_SIZE]; /********************************************************************* * LOCAL FUNCTIONS */ static void sensorTaskFxn(UArg a0, UArg a1); /********************************************************************* * PROFILE CALLBACKS */ /********************************************************************* * PUBLIC FUNCTIONS */ /********************************************************************* * @fn SensorTagBar_createTask * * @brief Task creation function for barometer sensor * * @param none * * @return none */ void SensorTagTest_createTask(void) { Task_Params taskParames; // Create the task for the state machine Task_Params_init(&taskParames); taskParames.stack = sensorTaskStack; taskParames.stackSize = SENSOR_TASK_STACK_SIZE; taskParames.priority = SENSOR_TASK_PRIORITY; Task_construct(&sensorTask, sensorTaskFxn, &taskParames, NULL); } /********************************************************************* * Private functions */ /********************************************************************* * @fn sensorTaskFxn * * @brief The task loop of the humidity readout task * * @return none */ static void sensorTaskFxn(UArg a0, UArg a1) { HandleGpioPin = PIN_open(&PinGpioState, SensortagAppPinTable); // Task loop while (true) { PIN_setOutputValue(HandleGpioPin,Board_LED1, 1); DELAY_MS(500); PIN_setOutputValue(HandleGpioPin,Board_LED1, 0); DELAY_MS(500); PIN_setOutputValue(HandleGpioPin,Board_LED1, 1); DELAY_MS(500); PIN_setOutputValue(HandleGpioPin,Board_LED1, 0); DELAY_MS(500); PIN_setOutputValue(HandleGpioPin,Board_LED1, 1); DELAY_MS(500); PIN_setOutputValue(HandleGpioPin,Board_LED1, 0); DELAY_MS(500); /* Configure DIO for wake up from shutdown */ PINCC26XX_setWakeup(SensortagAppPinTable); /* Go to shutdown */ Power_shutdown(NULL, 0); } }