Tool/software:
Hi,
I am working MSP430FR2673 based touch switch. I want to rest the touch calibrartion in software if the switch is touch more than 20 sec. If it possiblePlease replay.
Thank you
Athulya
Tool/software:
Hi,
I am working MSP430FR2673 based touch switch. I want to rest the touch calibrartion in software if the switch is touch more than 20 sec. If it possiblePlease replay.
Thank you
Athulya
No demo for that, that should be easy to be implemented, you can enabled a timer to start count the time when the touch event happen and do the calibration when it more than 20 sec.
Oh, sorry missing that. It is the sensor's parameter structure that located in the file CAPT_UserConfig.c file like below
Hi,
After touch calibration function void CAPT_calibrateSensor(tSensor *pSensor), touch is enable or not
void Touch_Read(void)
{
/*****************************TOUCH1***************************************************/
if(CAPT_appHandler()==true)
{
if(g_pCaptivateSensorArray[2]->bSensorTouch == true)
{
static uint32_t timer_start = 0;
static uint8_t Long_Press_Flag = 0;
if(Touch_Read_Flag[0] == 0)
{
Switch_Operation(SWITCH_1,SW_ON);
//PMMCTL0 = PMMPW | PMMSWBOR; // Software BOR reset
timer_start = timer_count;
Long_Press_Flag = 0;
}
else if(Touch_Read_Flag[0] == 2)
{
Switch_Operation(SWITCH_1,SW_OFF);
timer_start = timer_count;
Long_Press_Flag = 0;
}
if((g_pCaptivateSensorArray[2]->bSensorTouch == true))
{
if((Touch_Read_Flag[0] == 1) || (Touch_Read_Flag[0] == 3))
{
if(Long_Press_Flag == 0)
{
uint32_t Now = timer_count;
if(Now - timer_start >= 500)//5000
{
Long_Press_Flag = 1;
CAPT_calibrateSensor(g_pCaptivateSensorArray[2]);
}
}
}
}
}
__delay_cycles( 1600);
}
else
{
if(Touch_Read_Flag[0] == 1)
{
Touch_Read_Flag[0] = 2;
}
else if(Touch_Read_Flag[0] == 3)
{
Touch_Read_Flag[0] = 0;
}
}
When long press the touch is calibarted after I want to touch this switch when that calibration is done.
touch is enable or not
After the calibration the touch function will still be enabled.
**Attention** This is a public forum