Tool/software: TI-RTOS
Hi,
I am using a mmw demo application, in that i assigned interrupt at both edges of switch, at rising edge will start sensor and viceversa falling edge it will stop sensor. but once i start sensor by SW1 interrupt, fail to stop and again start. i tried sw configs at low and high priority interrupt.
Please suggest way to work out.
The requirement is to start/stop sensor by using SW1 (Client requirement).
For reference i attached snapshot of mss_main.c
static int cnt = 0; static void MmwDemo_switchPressFxn(unsigned int index) { if (cnt == 0) { /* NO: We need to start the sensor now. */ MmwDemo_notifySensorStart(true); cnt++; } else { MmwDemo_notifySensorStop(); cnt =0; } } void MmwDemo_mssCtrlPathTask(UArg arg0, UArg arg1) { . . . /********************************************************************** * Setup the SW1 switch on the EVM connected to GPIO_1 * - This is used as an input * - Enable interrupt to be notified on a switch press **********************************************************************/ GPIO_setConfig (SOC_XWR16XX_GPIO_1, GPIO_CFG_INPUT | GPIO_CFG_IN_INT_BOTH_EDGES | GPIO_CFG_IN_INT_LOW); GPIO_setCallback (SOC_XWR16XX_GPIO_1, MmwDemo_switchPressFxn); GPIO_enableInt (SOC_XWR16XX_GPIO_1); /********************************************************************** * Setup the DS3 LED on the EVM connected to GPIO_2 **********************************************************************/ . . . }
Regards
Madan