This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/AWR1642BOOST: GPIO_SW1 to control sensor start/stop

Part Number: AWR1642BOOST

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

  • Hi Madan,

    Your question has been referred to an AWR team member. Someone should have a response for you shortly.


    Cheers,
    Akash
  • Hello Madan,
    What error value you are getting when it fails? As I understand that your are trying to do sensor_start & stop in one button press and release event.
    But Sensor-stop you should only after you get sensor-start Asynchronous event from radarSS as SW1 button debouncing is very less time for context switching and get the Async Event.

    Could you pleaese check if you got sensor-start Async Event and what is delay b/w rising edge & falling edge of SW1?


    Regards,
    Jitendra Gupta